[BACK]Return to mdoc.3 CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/Attic/mdoc.3 between version 1.50 and 1.53

version 1.50, 2010/10/10 09:47:05 version 1.53, 2011/01/03 11:27:32
Line 33 
Line 33 
 .In mdoc.h  .In mdoc.h
 .Vt extern const char * const * mdoc_macronames;  .Vt extern const char * const * mdoc_macronames;
 .Vt extern const char * const * mdoc_argnames;  .Vt extern const char * const * mdoc_argnames;
   .Ft int
   .Fo mdoc_addspan
   .Fa "struct mdoc *mdoc"
   .Fa "const struct tbl_span *span"
   .Fc
 .Ft "struct mdoc *"  .Ft "struct mdoc *"
 .Fo mdoc_alloc  .Fo mdoc_alloc
 .Fa "struct regset *regs"  .Fa "struct regset *regs"
Line 91  See
Line 96  See
 for details.  for details.
 .El  .El
 .Ss Functions  .Ss Functions
   If
   .Fn mdoc_addspan ,
   .Fn mdoc_parseln ,
   or
   .Fn mdoc_endparse
   return 0, calls to any function but
   .Fn mdoc_reset
   or
   .Fn mdoc_free
   will raise an assertion.
 .Bl -ohang  .Bl -ohang
   .It Fn mdoc_addspan
   Add a table span to the parsing stream.
   Returns 0 on failure, 1 on success.
 .It Fn mdoc_alloc  .It Fn mdoc_alloc
 Allocates a parsing structure.  Allocates a parsing structure.
 The  The
 .Fa data  .Fa data
 pointer is passed to  pointer is passed to
 .Fa msgs .  .Fa msgs .
 Returns NULL on failure.  Always returns a valid pointer.
 If non-NULL, the pointer must be freed with  The pointer must be freed with
 .Fn mdoc_free .  .Fn mdoc_free .
 .It Fn mdoc_reset  .It Fn mdoc_reset
 Reset the parser for another parse routine.  Reset the parser for another parse routine.
Line 127  the resulting tree is incomplete.
Line 145  the resulting tree is incomplete.
 Returns 0 on failure, 1 on success.  Returns 0 on failure, 1 on success.
 .It Fn mdoc_node  .It Fn mdoc_node
 Returns the first node of the parse.  Returns the first node of the parse.
 Note that if  
 .Fn mdoc_parseln  
 or  
 .Fn mdoc_endparse  
 return 0, the tree will be incomplete.  
 .It Fn mdoc_meta  .It Fn mdoc_meta
 Returns the document's parsed meta-data.  Returns the document's parsed meta-data.
 If this information has not yet been supplied or  
 .Fn mdoc_parseln  
 or  
 .Fn mdoc_endparse  
 return 0, the data will be incomplete.  
 .El  .El
 .Ss Variables  .Ss Variables
 .Bl -ohang  .Bl -ohang
Line 330  mdoc_free(mdoc);
Line 338  mdoc_free(mdoc);
 .Pp  .Pp
 To compile this, execute  To compile this, execute
 .Pp  .Pp
 .D1 % cc main.c libmdoc.a libmandoc.a  .Dl % cc main.c libmdoc.a libmandoc.a
 .Pp  .Pp
 where  where
 .Pa main.c  .Pa main.c

Legend:
Removed from v.1.50  
changed lines
  Added in v.1.53

CVSweb