From fe1bdcb23f58a4cd623676506351ee9021303f2c Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Tue, 14 May 2002 06:05:06 +0000 Subject: [PATCH] Produce "dip" -- basically digested paragraphs for standalone backends --- doc/Makefile.in | 2 +- doc/rdsrc.pl | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/doc/Makefile.in b/doc/Makefile.in index 8d308ca6..e7cd2d56 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -62,7 +62,7 @@ nasm.inf: nasmdoc.ipf ipfc -i -s $< $@ clean: - -rm -f *.rtf *.hpj *.texi *.ph *.gid *.ipf + -rm -f *.rtf *.hpj *.texi *.gid *.ipf *.dip -rm -f *.aux *.cp *.fn *.ky *.pg *.log *.toc *.tp *.vr spotless: clean diff --git a/doc/rdsrc.pl b/doc/rdsrc.pl index e667c21d..e9f5c109 100644 --- a/doc/rdsrc.pl +++ b/doc/rdsrc.pl @@ -142,6 +142,9 @@ print "done.\n"; print "Producing WinHelp output: "; &write_hlp; print "done.\n"; +print "Producing Documentation Intermediate Paragraphs: "; +&write_dip; +print "done.\n"; sub got_para { local ($_) = @_; @@ -2335,3 +2338,26 @@ sub font_metrics { 600, 600, 600, 600, 0, 0, 0, 0 ); } + +# +# This produces documentation intermediate paragraph format; this is +# basically the digested output of the front end. Intended for use +# by future backends, instead of putting it all in the same script. +# +sub write_dip { + open(PARAS, "> nasmdoc.dip"); + foreach $k (keys(%metadata)) { + print PARAS 'meta :', $k, "\n"; + print PARAS $metadata{$k},"\n"; + } + for ($para = 0; $para <= $#pnames; $para++) { + print PARAS $pflags[$para], "\n"; + print PARAS join("\037", @{$pnames[$para]}, "\n"); + } + foreach $k (@itags) { + print PARAS 'indx :', $k, "\n"; + print PARAS join("\037", @{$idxmap{$k}}), "\n"; + } + close(PARAS); +} + -- 2.11.4.GIT