Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-release > by-pkgid > 6b3585ea67ce3e79c9049b5b33294cdd > files > 660

docbook-style-dsssl-doc-1.79-16.mga7.noarch.rpm

<RefEntry id="my-debug">
<!-- This file is generated automatically from the DSSSL source. -->
<!-- Do not edit this file! -->
<?html-filename my-debug.html>

<RefMeta>
  <RefEntryTitle>my-debug</RefEntryTitle>
  <RefMiscInfo Role="file">dblib.dsl</RefMiscInfo>
</RefMeta>

<RefNameDiv>
  <RefName>my-debug</RefName>
  <RefPurpose>A debugging function more helpful than (debug)</RefPurpose>
</RefNameDiv>

<RefSynopsisDiv><Title>Synopsis</Title>
<Synopsis>
(my-debug x #!optional return-value)
</Synopsis>
</RefSynopsisDiv>

<RefSect1><Title>Description</Title>

<para>
A version of debug that tries to print information more helpful
than "unknown object ...".  Will need extending for any further
types added to Jade which don't have useful print methods.
(Should yield more information extracted from each type.)
</para>
<variablelist>
<varlistentry><term>x</term>
<listitem>
<para>
The object about which debugging information is desired.
</para>
</listitem>
</varlistentry>
</variablelist>

</RefSect1>

<RefSect1><Title>Author</Title>

<para>
Tony Graham</para>
</RefSect1>
<RefSect1><Title>Source Code</Title>

<ProgramListing>
(define (my-debug x #!optional return-value)
  ;; A debugging function more helpful than (debug)
  (let ((msg (debug (cond ((node-list? x)
			   (if (node-list-empty? x)
			       (list 'empty-node-list x)
			       (list (if (named-node-list? x)
					 'named-node-list
					 'node-list)
				     (node-list-length x) x)))
			  ((sosofo? x)
			   (list 'sosofo x))
			  ((procedure? x)
			   (list 'procedure x))
			  ((style? x)
			   (list 'style x))
			  ((address? x)
			   (list 'address x))
			  ((color? x)
			   (list 'color x))
			  ((color-space? x)
			   (list 'color-space x))
			  ((display-space? x)
			   (list 'display-space x))
			  ((inline-space? x)
			   (list 'inline-space x))
			  ((glyph-id? x)
			   (list 'glyph-id x))
			  ((glyph-subst-table? x)
			   (list 'glyph-subst-table x))
			  (else x)))))
    return-value))
</ProgramListing>
</RefSect1>

</RefEntry>