; As a companion to ./rsl2dd, cruise the generated dd-links.dat file and make ; an x.rsl.html file for every file x.rsl listed in dd-links.dat. The .html ; file has simple header and footer tags to format it as a
 doc.
;
; The main work in the .html file is to tag the first line of each defined
; entity, as cited in dd-links.dat, html name refs.  Entires in the links file
; are of the follwoing format
;
;     obj/op-name source-file line-number column-number
;
; The following is the general strategy for dealing with these entries.
; Foreach entry, do the following:
;
;     (a) open the source file if it's not already and goto its buffer
;     (b) goto cited line number
;     (c) search for the obj/op name on this and immediately neighboring lines
;         (due to a translator bug that gets line numbers slightly off some
;	  times). 
;     (d) insert the html name ref tags
;

(defun rsl2dd ()
    ; Open the dd-links.dat file

    (while (not eolp)

	; Grab the parts
	(setq name (get-next-part))
	(setq hname (concat name ".html"))
	(setq file (get-next-part))
	(setq line (string-to-int (get-next-part)))

	; Create/open the file if necessary and go to its buffer in any case.
	(if (not (get-buffer hname))
	    (find-file hname)
	)
	(switch-to-buffer hname)
	


(defun get-next-part ()
    (setq d (dot))
    (search-forward " " nil t)
    (buffer-substring d (1- (dot)))
)