file_case.{h,cpp}: wether->whether; 2017
[s-roff.git] / s-gnu-diff.sh
blobe5d1f3125d241f44d5b0540d1a88dc516b349ae0
1 #@ Generate real (whitespace normalized) difference of S-roff and GNU roff.
3 DIFF='diff -Napruw'
4 MANUALS=true
5 LDIRBASE=./ #roff.git/
6 GDIRBASE=../groff.git/
8 ## -- >8 -- 8< -- ##
10 [ ${#} -gt 0 ] && WANT="${*}" || WANT=
11 LDIR= GDIR=
13 should() {
14 [ -z "${WANT}" ] && return 0
15 { i=${WANT}; echo "_${i}_" | grep "_${1}_"; } >/dev/null 2>&1
18 new() {
19 if [ -f ${LDIRBASE}${LDIR}/${1} ]; then
20 $DIFF ${LDIRBASE}${LDIR}/${1} /dev/null
21 else
22 echo >&2 '============'
23 echo >&2 "new no file=${1} in LDIR=${LDIR}"
24 echo >&2 '============'
25 exit 1
29 eqd() {
30 if [ -f ${LDIRBASE}${LDIR}/${1} ] &&
31 [ -f ${GDIRBASE}${GDIR}/${1} ]; then
32 ${DIFF} ${LDIRBASE}${LDIR}/${1} ${GDIRBASE}${GDIR}/${1}
33 else
34 echo >&2 '============'
35 echo >&2 "eqd no file=${1} in LDIR=${LDIR} or GDIR=${GDIR}"
36 echo >&2 '============'
37 exit 1
41 ned() {
42 if [ -f ${LDIRBASE}${LDIR}/${1} ] &&
43 [ -f ${GDIRBASE}${GDIR}/${2} ]; then
44 ${DIFF} ${LDIRBASE}${LDIR}/${1} ${GDIRBASE}${GDIR}/${2}
45 elif [ -f ${LDIRBASE}${LDIR}/${1} ]; then
46 echo >&2 '============'
47 echo >&2 "ned no GDIR=${GDIR}/${2}"
48 echo >&2 '============'
49 exit 1
50 else
51 echo >&2 '============'
52 echo >&2 "ned no LDIR=${LDIR}/${1} (at least)"
53 echo >&2 '============'
54 exit 1
58 # include
59 if should include; then
60 LDIR=include GDIR=src/${LDIR}
62 new config.h.in
63 new file_case.h
65 eqd cmap.h
66 eqd color.h
67 eqd cset.h
68 eqd device.h
69 eqd driver.h
70 eqd errarg.h
71 eqd error.h
72 eqd font.h
73 eqd geometry.h
74 eqd getopt.h
75 eqd getopt_int.h
76 eqd gettext.h
77 eqd html-strings.h
78 eqd htmlhint.h
79 eqd index.h
80 eqd itable.h
81 eqd lib.h
82 eqd localcharset.h
83 eqd macropath.h
84 eqd nonposix.h
85 eqd paper.h
86 eqd posix.h
87 eqd printer.h
88 eqd ptable.h
89 eqd refid.h
90 eqd relocate.h
91 eqd search.h
92 eqd searchpath.h
93 eqd stringclass.h
94 eqd symbol.h
95 eqd unicode.h
98 ## src/
100 LDIR=src/dev-dvi
101 if should dev-dvi; then
102 GDIR=src/devices/grodvi
104 new dvi-config.h.in
105 eqd dvi.cpp
107 if ${MANUALS}; then
108 LDIR=man
109 ned dev-dvi.1.in grodvi.man
113 LDIR=src/dev-html
114 if should dev-html; then
115 GDIR=src/devices/grohtml
117 new html-config.h.in
118 eqd html-table.cpp
119 eqd html-table.h
120 eqd html-text.cpp
121 eqd html-text.h
122 eqd html.h
123 eqd output.cpp
124 eqd post-html.cpp
126 if ${MANUALS}; then
127 LDIR=man
128 ned dev-html.1.in grohtml.man
132 LDIR=src/dev-ps
133 if should dev-ps; then
134 GDIR=src/devices/grops
136 new ps-config.h.in
137 eqd psrm.cpp
138 eqd ps.h
139 eqd ps.cpp
141 if ${MANUALS}; then
142 LDIR=man
143 ned dev-ps.1.in grops.man
147 LDIR=src/dev-tty
148 if should dev-tty; then
149 GDIR=src/devices/grotty
151 new tty-config.h.in
152 eqd tty.cpp
154 if ${MANUALS}; then
155 LDIR=man
156 ned dev-tty.1.in grotty.man
160 LDIR=src/lib-bib
161 if should lib-bib; then
162 GDIR=src/libs/libbib
164 new bib.h
165 eqd common.cpp
166 eqd index.cpp
167 eqd linear.cpp
168 eqd map.c
169 eqd search.cpp
172 LDIR=src/lib-driver
173 if should lib-driver; then
174 GDIR=src/libs/libdriver
176 eqd input.cpp
177 eqd printer.cpp
180 LDIR=src/lib-roff
181 if should lib-roff; then
182 GDIR=src/libs/libgroff
184 eqd change_lf.cpp
185 eqd cmap.cpp
186 eqd color.cpp
187 eqd config.charset
188 eqd cset.cpp
189 eqd device.cpp
190 eqd errarg.cpp
191 eqd error.cpp
192 eqd fatal.cpp
193 new file_case.cpp
194 eqd filename.cpp
195 eqd font.cpp
196 eqd fontfile.cpp
197 eqd geometry.cpp
198 eqd getopt.c
199 eqd getopt1.c
200 eqd glyphuni.cpp
201 eqd htmlhint.cpp
202 eqd hypot.cpp
203 eqd iftoa.c
204 eqd invalid.cpp
205 eqd itoa.c
206 eqd lf.cpp
207 eqd lineno.cpp
208 eqd localcharset.c
209 eqd macropath.cpp
210 ned make-uniuni.sh make-uniuni
211 eqd matherr.c
212 eqd maxfilename.cpp
213 eqd maxpathname.cpp
214 eqd mksdir.cpp
215 eqd mkstemp.cpp
216 eqd nametoindex.cpp
217 eqd new.cpp
218 eqd paper.cpp
219 eqd prime.cpp
220 eqd progname.c
221 eqd ptable.cpp
222 eqd putenv.c
223 eqd quotearg.c
224 eqd relocatable.h
225 eqd relocate.cpp
226 eqd searchpath.cpp
227 eqd spawnvp.c
228 eqd strcasecmp.c
229 eqd string.cpp
230 eqd strncasecmp.c
231 eqd strsave.cpp
232 eqd symbol.cpp
233 eqd tmpfile.cpp
234 eqd tmpname.cpp
235 eqd unicode.cpp
236 eqd uniglyph.cpp
237 eqd uniuni.cpp
240 LDIR=src/lib-snprintf
241 if should lib-snprintf; then
242 GDIR=src/libs/snprintf
244 eqd snprintf.c
247 LDIR=src/nroff
248 if should nroff; then
249 GDIR=src/roff/nroff
251 ned nroff.sh.in nroff.sh
253 if ${MANUALS}; then
254 LDIR=man
255 ned src-nroff.1.in nroff.man
259 LDIR=src/pre-eqn
260 if should pre-eqn; then
261 GDIR=src/preproc/eqn
263 new eqn-config.h.in
264 eqd box.cpp
265 eqd box.h
266 eqd delim.cpp
267 eqd eqn.h
268 ned eqn.y eqn.ypp
269 eqd lex.cpp
270 eqd limit.cpp
271 eqd list.cpp
272 eqd main.cpp
273 eqd mark.cpp
274 ned neqn.sh.in neqn.sh
275 eqd other.cpp
276 eqd over.cpp
277 eqd pbox.h
278 eqd pile.cpp
279 eqd script.cpp
280 eqd special.cpp
281 eqd sqrt.cpp
282 eqd text.cpp
284 if ${MANUALS}; then
285 LDIR=man
286 ned pre-eqn.1.in eqn.man
287 ned pre-neqn.1.in neqn.man
291 LDIR=src/pre-grn
292 if should pre-grn; then
293 GDIR=src/preproc/grn
295 new grn-config.h.in
296 eqd README
297 eqd gprint.h
298 eqd hdb.cpp
299 eqd hgraph.cpp
300 eqd hpoint.cpp
301 eqd main.cpp
303 if ${MANUALS}; then
304 LDIR=man
305 ned pre-grn.1.in grn.man
309 LDIR=src/pre-html
310 if should pre-html; then
311 GDIR=src/preproc/html
313 new html-config.h.in
314 eqd pre-html.cpp
315 eqd pre-html.h
316 eqd pushback.cpp
317 eqd pushback.h
320 LDIR=src/pre-pic
321 if should pre-pic; then
322 GDIR=src/preproc/pic
324 new pic-config.h.in
325 eqd common.cpp
326 eqd common.h
327 eqd lex.cpp
328 eqd main.cpp
329 eqd object.cpp
330 eqd object.h
331 eqd output.h
332 eqd pic.h
333 ned pic.y pic.ypp
334 eqd position.h
335 eqd tex.cpp
336 eqd text.h
337 eqd troff.cpp
339 if ${MANUALS}; then
340 LDIR=man
341 ned pre-pic.1.in pic.man
345 LDIR=src/pre-preconv
346 if should pre-preconv; then
347 GDIR=src/preproc/preconv
349 new preconv-config.h.in
350 eqd preconv.cpp
352 if ${MANUALS}; then
353 LDIR=man
354 ned pre-preconv.1.in preconv.man
358 LDIR=src/pre-refer
359 if should pre-refer; then
360 GDIR=src/preproc/refer
362 new refer-config.h.in
363 eqd command.cpp
364 eqd command.h
365 ned label.y label.ypp
366 eqd ref.cpp
367 eqd ref.h
368 eqd refer.cpp
369 eqd refer.h
370 eqd token.cpp
371 eqd token.h
373 if ${MANUALS}; then
374 LDIR=man
375 ned pre-refer.1.in refer.man
379 LDIR=src/pre-soelim
380 if should pre-soelim; then
381 GDIR=src/preproc/soelim
383 new soelim-config.h.in
384 eqd soelim.cpp
386 if ${MANUALS}; then
387 LDIR=man
388 ned pre-soelim.1.in soelim.man
392 LDIR=src/pre-tbl
393 if should pre-tbl; then
394 GDIR=src/preproc/tbl
396 new tbl-config.h.in
397 eqd main.cpp
398 eqd table.cpp
399 eqd table.h
401 if ${MANUALS}; then
402 LDIR=man
403 ned pre-tbl.1.in tbl.man
407 LDIR=src/roff
408 if should roff; then
409 GDIR=src/roff/groff
411 new roff-config.h
412 eqd pipeline.c
413 eqd pipeline.h
414 ned roff.cpp groff.cpp
416 if ${MANUALS}; then
417 LDIR=man
418 ned src-roff.1.in groff.man
422 LDIR=src/troff
423 if should troff; then
424 GDIR=src/roff/troff
426 new troff-config.h
427 eqd charinfo.h
428 eqd column.cpp
429 eqd dictionary.cpp
430 eqd dictionary.h
431 eqd div.cpp
432 eqd div.h
433 eqd env.cpp
434 eqd env.h
435 eqd hvunits.h
436 eqd input.cpp
437 eqd input.h
438 eqd mtsm.cpp
439 eqd mtsm.h
440 eqd node.cpp
441 eqd node.h
442 eqd number.cpp
443 eqd reg.cpp
444 eqd reg.h
445 eqd request.h
446 eqd token.h
447 eqd troff.h
449 if ${MANUALS}; then
450 LDIR=man
451 ned src-troff.1.in troff.man
455 LDIR=src/ute-addftinfo
456 if should ute-addftinfo; then
457 GDIR=src/utils/addftinfo
459 new addftinfo-config.h.in
460 eqd addftinfo.cpp
461 eqd guess.cpp
462 eqd guess.h
464 if ${MANUALS}; then
465 LDIR=man
466 ned ute-addftinfo.1.in addftinfo.man
470 LDIR=src/ute-afmtodit
471 if should ute-afmtodit; then
472 GDIR=src/utils/afmtodit
474 ned afmtodit.pl.in afmtodit.pl
475 eqd afmtodit.tables
476 eqd make-afmtodit-tables
478 if ${MANUALS}; then
479 LDIR=man
480 ned ute-afmtodit.1.in afmtodit.man
484 LDIR=src/ute-indxbib
485 if should ute-indxbib; then
486 GDIR=src/utils/indxbib
488 new indxbib-config.h.in
489 eqd eign
490 eqd indxbib.cpp
492 if ${MANUALS}; then
493 LDIR=man
494 ned ute-indxbib.1.in indxbib.man
498 LDIR=src/ute-lkbib
499 if should ute-lkbib; then
500 GDIR=src/utils/lkbib
502 new lkbib-config.h.in
503 eqd lkbib.cpp
505 if ${MANUALS}; then
506 LDIR=man
507 ned ute-lkbib.1.in lkbib.man
511 LDIR=src/ute-lookbib
512 if should ute-lookbib; then
513 GDIR=src/utils/lookbib
515 new lookbib-config.h
516 eqd lookbib.cpp
518 if ${MANUALS}; then
519 LDIR=man
520 ned ute-lookbib.1.in lookbib.man
524 LDIR=src/ute-pfbtops
525 if should ute-pfbtops; then
526 GDIR=src/utils/pfbtops
528 new pfbtops-config.h
529 eqd pfbtops.c
531 if ${MANUALS}; then
532 LDIR=man
533 ned ute-pfbtops.1.in pfbtops.man
537 LDIR=src/ute-tfmtodit
538 if should ute-tfmtodit; then
539 GDIR=src/utils/tfmtodit
541 new tfmtodit-config.h
542 eqd tfmtodit.cpp
544 if ${MANUALS}; then
545 LDIR=man
546 ned ute-tfmtodit.1.in tfmtodit.man
550 ## font/
552 if should font; then
553 LDIR=font GDIR=${LDIR}/util
554 eqd make-Rproto
556 LDIR=font/dev-ascii GDIR=font/devascii
557 ned DESC.proto.in DESC.proto
558 eqd R.proto
560 LDIR=font/dev-cp1047 GDIR=font/devcp1047
561 ned DESC.proto.in DESC.proto
562 eqd R.proto
564 LDIR=font/dev-dvi GDIR=font/devdvi
565 eqd CW
566 eqd CWEC
567 eqd CWI
568 eqd CWIEC
569 eqd CWITC
570 eqd CWTC
571 eqd DESC.in
572 eqd EX
573 eqd HB
574 eqd HBEC
575 eqd HBI
576 eqd HBIEC
577 eqd HBITC
578 eqd HBTC
579 eqd HI
580 eqd HIEC
581 eqd HITC
582 eqd HR
583 eqd HREC
584 eqd HRTC
585 eqd MI
586 eqd S
587 eqd SA
588 eqd SB
589 eqd SC
590 eqd TB
591 eqd TBEC
592 eqd TBI
593 eqd TBIEC
594 eqd TBITC
595 eqd TBTC
596 eqd TI
597 eqd TIEC
598 eqd TITC
599 eqd TR
600 eqd TREC
601 eqd TRTC
603 LDIR=font/dev-dvi/generate GDIR=font/devdvi/generate
604 ned compile.sh CompileFonts
605 eqd ec.map
606 eqd msam.map
607 eqd msbm.map
608 eqd tc.map
609 eqd texb.map
610 eqd texex.map
611 eqd texi.map
612 eqd texmi.map
613 eqd texr.map
614 eqd texsy.map
615 eqd textex.map
616 eqd textt.map
618 LDIR=font/dev-html GDIR=font/devhtml
619 ned DESC.proto.in DESC.proto
620 eqd R.in
621 eqd R.proto
623 LDIR=font/dev-latin1 GDIR=font/devlatin1
624 ned DESC.proto.in DESC.proto
625 eqd R.proto
627 LDIR=font/dev-ps GDIR=font/devps
628 eqd AB
629 eqd ABI
630 eqd AI
631 eqd AR
632 eqd BMB
633 eqd BMBI
634 eqd BMI
635 eqd BMR
636 eqd CB
637 eqd CBI
638 eqd CI
639 eqd CR
640 eqd DESC.in
641 eqd EURO
642 eqd HB
643 eqd HBI
644 eqd HI
645 eqd HNB
646 eqd HNBI
647 eqd HNI
648 eqd HNR
649 eqd HR
650 eqd NB
651 eqd NBI
652 eqd NI
653 eqd NR
654 eqd PB
655 eqd PBI
656 eqd PI
657 eqd PR
658 eqd S
659 eqd SS
660 eqd TB
661 eqd TBI
662 eqd TI
663 eqd TR
664 eqd ZCMI
665 eqd ZD
666 eqd ZDR
667 eqd download
668 eqd freeeuro.afm
669 eqd freeeuro.pfa
670 eqd prologue.ps
671 eqd psstrip.sed
672 eqd symbol.afm
673 eqd symbolmap
674 eqd symbolsl.ps
675 eqd text.enc
676 eqd zapfdr.afm
677 eqd zapfdr.ps
679 LDIR=font/dev-ps/generate GDIR=font/devps/generate
680 eqd afmname
681 eqd dingbats.map
682 eqd dingbats.rmap
683 eqd freeeuro.sfd
684 eqd lgreekmap
685 eqd make-zapfdr
686 eqd sfdtopfa.pe
687 eqd symbol.sed
688 eqd symbolchars
689 eqd symbolsl.afm
690 eqd symbolsl.awk
691 eqd textmap
692 eqd zapfdr.sed
694 LDIR=font/dev-utf8 GDIR=font/devutf8
695 ned DESC.proto.in DESC.proto
696 eqd NOTES
697 eqd R.in
698 eqd R.proto
701 # tmac
702 if should tmac; then
703 LDIR=tmac GDIR=${LDIR}
705 eqd 62bit.tmac
706 eqd LOCALIZATION
707 eqd Xps.tmac
708 eqd a4.tmac
709 eqd an-ext.tmac
710 eqd an-old.tmac
711 eqd an.tmac
712 eqd andoc.tmac
713 new ascii.tmac
714 eqd composite.tmac
715 eqd cp1047.tmac
716 eqd cs.tmac
717 eqd de.tmac
718 eqd den.tmac
719 eqd devtag.tmac
720 ned doc.tmac doc.tmac-u
721 eqd dvi.tmac
722 ned e.tmac e.tmac-u
723 eqd ec.tmac
724 eqd eqnrc
725 eqd europs.tmac
726 eqd fallbacks.tmac
727 eqd fr.tmac
728 eqd html-end.tmac
729 eqd html.tmac
730 eqd hyphen.cs
731 eqd hyphen.den
732 eqd hyphen.det
733 eqd hyphen.fr
734 eqd hyphen.sv
735 eqd hyphen.us
736 eqd hyphenex.cs
737 eqd hyphenex.det
738 eqd hyphenex.pl
739 eqd hyphenex.us
740 eqd latin1.tmac
741 eqd latin2.tmac
742 eqd latin5.tmac
743 eqd latin9.tmac
744 eqd man.local
745 eqd man.tmac
746 eqd mandoc.tmac
747 ned mdoc-common doc-common-u
748 ned mdoc-ditroff doc-ditroff-u
749 ned mdoc-nroff doc-nroff-u
750 ned mdoc-syms doc-syms-u
751 eqd mdoc.local
752 eqd mdoc.tmac
753 eqd me.tmac
754 eqd ms.tmac
755 eqd papersize.tmac
756 eqd pic.tmac
757 eqd ps.tmac
758 eqd psfig.tmac
759 eqd psold.tmac
760 eqd pspic.tmac
761 eqd ptx.tmac
762 eqd refer-me.tmac
763 eqd refer-ms.tmac
764 eqd refer.tmac
765 eqd s.tmac
766 eqd safer.tmac
767 eqd sv.tmac
768 eqd trace.tmac
769 eqd trans.tmac
770 eqd troffrc
771 eqd troffrc-end
772 eqd tty-char.tmac
773 eqd tty.tmac
774 eqd unicode.tmac
775 ned www.tmac www.tmac.in
777 if ${MANUALS}; then
778 LDIR=man
779 ned tmac-man.7.in groff_man.man
780 ned tmac-mdoc.7.in groff_mdoc.man
781 ned tmac-me.7.in groff_me.man
782 ned tmac-ms.7.in groff_ms.man
783 ned tmac-trace.7.in groff_trace.man
784 ned tmac-www.7.in groff_www.man
788 # man (only the remains not handled by the others)
789 if should man && ${MANUALS}; then
790 LDIR=man GDIR=${LDIR}
792 ned l_ditroff.7.in ditroff.man
793 ned l_roff.7.in groff.man
794 ned l_roff-char.7.in groff_char.man
795 ned l_roff-diff.7.in groff_diff.man
796 ned l_roff-font.5.in groff_font.man
797 ned l_roff-history.7.in roff.man
798 ned l_roff-out.5.in groff_out.man
799 ned l_roff-tmac.5.in groff_tmac.man
802 # doc
803 if should doc && ${MANUALS}; then
804 LDIR=doc GDIR=${LDIR}
806 eqd grnexmpl.g
807 eqd grnexmpl.me
808 #ned groff.texinfo groff.texi
809 ned meintro.me.in meintro.me
810 ned meref.me.in meref.me
811 eqd pic.ms
814 ## contrib/
816 # hdtbl
817 if should hdtbl; then
818 LDIR=contrib/hdtbl GDIR=${LDIR}
820 ned hdtbl.tmac hdtbl.tmac-u
821 ned hdmisc.tmac hdmisc.tmac-u
822 if ${MANUALS}; then
823 ned hdtbl.7.in groff_hdtbl.man
826 LDIR=${LDIR}/examples GDIR=${GDIR}/examples
828 eqd chess_board.roff
829 eqd col_rowspan_colors.roff
830 eqd color_boxes.roff
831 eqd color_nested_tables.roff
832 eqd color_table_cells.roff
833 eqd color_transitions.roff
834 ned common.tmac common.roff
835 eqd fonts_n.in
836 eqd fonts_x.in
837 ned mixed_pickles.roff.in mixed_pickles.roff
838 eqd rainbow.roff
839 eqd short_reference.roff
842 # pdfmark
843 if should pdfmark; then
844 LDIR=contrib/pdfmark GDIR=${LDIR}
846 eqd cover.ms
847 ned pdfmark.ms.in pdfmark.ms
848 eqd pdfmark.tmac
849 ned pdfroff.sh.in pdfroff.sh
850 eqd spdf.tmac
851 if ${MANUALS}; then
852 ned pdfroff.1.in pdfroff.man
856 # s-sh-mode