From: Rupert S. <rsw...@us...> - 2013-05-28 12:47:53
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Maxima CAS". The branch, parse-info has been updated via 366098870350ea84d00d015fcf81dce9dfe1b466 (commit) from 6113ff682f2b38628ddeee858385ceb073478ebc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 366098870350ea84d00d015fcf81dce9dfe1b466 Author: Rupert Swarbrick <rsw...@gm...> Date: Tue May 28 13:47:38 2013 +0100 Add containing sections to the offset format diff --git a/lisp-utils/parse-info.lisp b/lisp-utils/parse-info.lisp index bb265b0..8aa0df7 100644 --- a/lisp-utils/parse-info.lisp +++ b/lisp-utils/parse-info.lisp @@ -17,16 +17,23 @@ ;; The output format ;; ;; The file contains a single, READable, list. The elements of the list are -;; lists of the form (NAME FILENAME START LENGTH). +;; lists of the form (NAME FILENAME START LENGTH NODE). +;; +;; - NAME is the name of the documentation topic +;; +;; - FILENAME is the file name of the portion of the info document where this +;; topic is found. (We don't use pathnames, since then you have to worry +;; about accidentally including absolute directory info which then breaks +;; when you install). +;; +;; - START and LENGTH in the above may be byte offsets or character offsets or +;; pretty much anything else, but we know that they are appropriate values for +;; FILE-OFFSET on the current lisp. (This may vary between lisps, which is why +;; we output an implementation-specific offset table). +;; +;; - NODE is either NIL or is a string naming the node that contains the topic +;; (used for index entries) ;; -;; START and LENGTH in the above may be byte offsets or character offsets or -;; pretty much anything else, but we know that they are appropriate values for -;; FILE-OFFSET on the current lisp. (This may vary between lisps, which is why -;; we output an implementation-specific offset table). FILENAME is the file -;; name of the portion of the info document that we read. (We don't use -;; pathnames, since then you have to worry about accidentally including -;; absolute directory info which then breaks when you install) - ;; How the code works: ;; ;; We read in the top-level info file ("maxima.info"), taking note of the @@ -641,7 +648,8 @@ offsets to the relevant bits of the document. Returns the resulting document." (concatenate 'string (pathname-name pathname) "." (pathname-type pathname)) (complete-topic-start topic) - (complete-topic-length topic)))) + (complete-topic-length topic) + (doc-topic-section topic)))) (defun dump-info (info-doc stream) "Dump out the two parsed offset tables to a stream, using prin1" diff --git a/src/info-documentation.lisp b/src/info-documentation.lisp index 223822b..c493d46 100644 --- a/src/info-documentation.lisp +++ b/src/info-documentation.lisp @@ -72,12 +72,14 @@ to :latin1." 'info-doc :name "maxima.info" :pathname pathname - :topics (mapcar (lambda (lst) - (destructuring-bind (name filename start length) lst - (make-instance 'info-topic - :name name :start start :length length - :relpath (parse-namestring filename)))) - offsets))) + :topics (mapcar + (lambda (lst) + (destructuring-bind (name filename start length section) lst + (make-instance 'info-topic + :name name :start start :length length + :relpath (parse-namestring filename) + :section section))) + offsets))) ;; TODO: Update this API! (defmethod documentation-all-topics ((doc info-doc)) ----------------------------------------------------------------------- Summary of changes: lisp-utils/parse-info.lisp | 28 ++++++++++++++++++---------- src/info-documentation.lisp | 14 ++++++++------ 2 files changed, 26 insertions(+), 16 deletions(-) hooks/post-receive -- Maxima CAS |