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

Diff for /mandoc/man_term.c between version 1.52 and 1.55

version 1.52, 2009/11/12 05:50:12 version 1.55, 2010/01/01 17:14:28
Line 14 
Line 14 
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF   * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.   * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */   */
   #ifdef HAVE_CONFIG_H
   #include "config.h"
   #endif
   
 #include <sys/types.h>  #include <sys/types.h>
   
 #include <assert.h>  #include <assert.h>
Line 63  struct termact {
Line 67  struct termact {
         void            (*post)(DECL_ARGS);          void            (*post)(DECL_ARGS);
 };  };
   
 #ifdef __linux__  
 extern  size_t            strlcpy(char *, const char *, size_t);  
 extern  size_t            strlcat(char *, const char *, size_t);  
 #endif  
   
 static  int               a2width(const struct man_node *);  static  int               a2width(const struct man_node *);
 static  int               a2height(const struct man_node *);  static  int               a2height(const struct man_node *);
   
Line 104  static void    post_RS(DECL_ARGS);
Line 103  static void    post_RS(DECL_ARGS);
 static  void              post_SH(DECL_ARGS);  static  void              post_SH(DECL_ARGS);
 static  void              post_SS(DECL_ARGS);  static  void              post_SS(DECL_ARGS);
 static  void              post_TP(DECL_ARGS);  static  void              post_TP(DECL_ARGS);
 static  void              post_i(DECL_ARGS);  
   
 static  const struct termact termacts[MAN_MAX] = {  static  const struct termact termacts[MAN_MAX] = {
         { pre_br, NULL }, /* br */          { pre_br, NULL }, /* br */
Line 129  static const struct termact termacts[MAN_MAX] = {
Line 127  static const struct termact termacts[MAN_MAX] = {
         { pre_RI, NULL }, /* IR */          { pre_RI, NULL }, /* IR */
         { pre_RI, NULL }, /* RI */          { pre_RI, NULL }, /* RI */
         { NULL, NULL }, /* na */          { NULL, NULL }, /* na */
         { pre_I, post_i }, /* i */          { pre_I, NULL }, /* i */
         { pre_sp, NULL }, /* sp */          { pre_sp, NULL }, /* sp */
         { pre_nf, NULL }, /* nf */          { pre_nf, NULL }, /* nf */
         { pre_fi, NULL }, /* fi */          { pre_fi, NULL }, /* fi */
Line 244  pre_I(DECL_ARGS)
Line 242  pre_I(DECL_ARGS)
   
   
 /* ARGSUSED */  /* ARGSUSED */
 static void  
 post_i(DECL_ARGS)  
 {  
   
         /* FIXME */  
         /*if (n->nchild)  
                 p->under--;*/  
 }  
   
   
 /* ARGSUSED */  
 static int  static int
 pre_fi(DECL_ARGS)  pre_fi(DECL_ARGS)
 {  {
Line 795  post_RS(DECL_ARGS)
Line 782  post_RS(DECL_ARGS)
 static void  static void
 print_man_node(DECL_ARGS)  print_man_node(DECL_ARGS)
 {  {
         int              c, sz;          int              c;
   
         c = 1;          c = 1;
   
Line 805  print_man_node(DECL_ARGS)
Line 792  print_man_node(DECL_ARGS)
                         term_vspace(p);                          term_vspace(p);
                         break;                          break;
                 }                  }
                 /*  
                  * Note!  This is hacky.  Here, we recognise the `\c'  
                  * escape embedded in so many -man pages.  It's supposed  
                  * to remove the subsequent space, so we mark NOSPACE if  
                  * it's encountered in the string.  
                  */  
                 sz = (int)strlen(n->string);  
                 term_word(p, n->string);                  term_word(p, n->string);
                 if (sz >= 2 && n->string[sz - 1] == 'c' &&  
                                 n->string[sz - 2] == '\\')  
                         p->flags |= TERMP_NOSPACE;  
   
                 /* FIXME: this means that macro lines are munged!  */                  /* FIXME: this means that macro lines are munged!  */
   

Legend:
Removed from v.1.52  
changed lines
  Added in v.1.55

CVSweb