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

Diff for /mandoc/mchars_alloc.3 between version 1.1 and 1.4

version 1.1, 2014/08/05 05:48:56 version 1.4, 2016/07/07 19:19:01
Line 23 
Line 23 
 .Nm mchars_num2char ,  .Nm mchars_num2char ,
 .Nm mchars_num2uc ,  .Nm mchars_num2uc ,
 .Nm mchars_spec2cp ,  .Nm mchars_spec2cp ,
 .Nm mchars_spec2str  .Nm mchars_spec2str ,
   .Nm mchars_uc2str
 .Nd character table for mandoc  .Nd character table for mandoc
 .Sh LIBRARY  
 .Lb libmandoc  
 .Sh SYNOPSIS  .Sh SYNOPSIS
 .In sys/types.h  .In sys/types.h
 .In mandoc.h  .In mandoc.h
 .Ft "struct mchars *"  
 .Fn mchars_alloc "void"  
 .Ft void  .Ft void
 .Fo mchars_free  .Fn mchars_alloc void
 .Fa "struct mchars *table"  .Ft void
 .Fc  .Fn mchars_free void
 .Ft char  .Ft char
 .Fo mchars_num2char  .Fo mchars_num2char
 .Fa "const char *decimal"  .Fa "const char *decimal"
Line 48 
Line 45 
 .Fc  .Fc
 .Ft int  .Ft int
 .Fo mchars_spec2cp  .Fo mchars_spec2cp
 .Fa "const struct mchars *table"  
 .Fa "const char *name"  .Fa "const char *name"
 .Fa "size_t sz"  .Fa "size_t sz"
 .Fc  .Fc
 .Ft "const char *"  .Ft "const char *"
 .Fo mchars_spec2str  .Fo mchars_spec2str
 .Fa "const struct mchars *table"  
 .Fa "const char *name"  .Fa "const char *name"
 .Fa "size_t sz"  .Fa "size_t sz"
 .Fa "size_t *rsz"  .Fa "size_t *rsz"
 .Fc  .Fc
   .Ft "const char *"
   .Fn mchars_uc2str "int codepoint"
 .Sh DESCRIPTION  .Sh DESCRIPTION
 These functions translate Unicode character numbers and  These functions translate Unicode character numbers and
 .Xr roff 7  .Xr roff 7
Line 133  escape sequences.
Line 130  escape sequences.
 .Pp  .Pp
 The function  The function
 .Fn mchars_alloc  .Fn mchars_alloc
 allocates an opaque  initializes a static
 .Vt "struct mchars *"  .Vt "struct ohash"
 table object for subsequent use by the following two lookup functions.  object for subsequent use by the following two lookup functions.
 When no longer needed, this object can be destroyed with  When no longer needed, this object can be destroyed with
 .Fn mchars_free .  .Fn mchars_free .
 .Pp  .Pp
Line 147  special character
Line 144  special character
 .Fa name  .Fa name
 consisting of  consisting of
 .Fa sz  .Fa sz
 characters in the  characters and returns the corresponding Unicode codepoint.
 .Fa table  
 and returns the corresponding Unicode codepoint.  
 If the  If the
 .Ar name  .Ar name
 is not recognized, \-1 is returned.  is not recognized, \-1 is returned.
Line 173  special character
Line 168  special character
 .Fa name  .Fa name
 consisting of  consisting of
 .Fa sz  .Fa sz
 characters in the  characters and returns an ASCII string representation.
 .Fa table  
 and returns an ASCII string representation.  
 The length of the representation is returned in  The length of the representation is returned in
 .Fa rsz .  .Fa rsz .
 In many cases, the meaning of such ASCII representations  In many cases, the meaning of such ASCII representations
Line 199  output module use this function to render
Line 192  output module use this function to render
 and  and
 .Ic \eC\(aq Ns Ar name Ns Ic \(aq  .Ic \eC\(aq Ns Ar name Ns Ic \(aq
 escape sequences.  escape sequences.
   .Pp
   The function
   .Fn mchars_uc2str
   performs a reverse lookup of the Unicode
   .Fa codepoint
   and returns an ASCII string representation, or the string
   .Qq <?>
   if none is available.
 .Sh FILES  .Sh FILES
 These funtions are implemented in the file  These funtions are implemented in the file
 .Pa chars.c .  .Pa chars.c .
 .Sh SEE ALSO  .Sh SEE ALSO
 .Xr mandoc 1 ,  .Xr mandoc 1 ,
 .Xr mandoc_escape 3 ,  .Xr mandoc_escape 3 ,
   .Xr ohash_init 3 ,
 .Xr mandoc_char 7 ,  .Xr mandoc_char 7 ,
 .Xr roff 7  .Xr roff 7
 .Sh HISTORY  .Sh HISTORY
Line 218  following mandoc versions:
Line 220  following mandoc versions:
 .It Fn mchars_num2uc Ta 1.11.3 Ta \(em Ta \(em  .It Fn mchars_num2uc Ta 1.11.3 Ta \(em Ta \(em
 .It Fn mchars_spec2cp Ta 1.11.2 Ta Fn chars_spec2cp Ta 1.10.5  .It Fn mchars_spec2cp Ta 1.11.2 Ta Fn chars_spec2cp Ta 1.10.5
 .It Fn mchars_spec2str Ta 1.11.2 Ta Fn a2ascii Ta 1.5.3  .It Fn mchars_spec2str Ta 1.11.2 Ta Fn a2ascii Ta 1.5.3
   .It Fn mchars_uc2str Ta 1.13.2 Ta \(em Ta \(em
 .El  .El
 .Sh AUTHORS  .Sh AUTHORS
 .An Kristaps Dzonsons Aq Mt kristaps@bsd.lv  .An Kristaps Dzonsons Aq Mt kristaps@bsd.lv

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4

CVSweb