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

Diff for /mandoc/man.c between version 1.75 and 1.78

version 1.75, 2010/05/26 14:03:54 version 1.78, 2010/06/26 16:07:08
Line 1 
Line 1 
 /*      $Id$ */  /*      $Id$ */
 /*  /*
  * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>   * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv>
  *   *
  * Permission to use, copy, modify, and distribute this software for any   * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above   * purpose with or without fee is hereby granted, provided that the above
Line 28 
Line 28 
 #include <string.h>  #include <string.h>
   
 #include "mandoc.h"  #include "mandoc.h"
   #include "regs.h"
 #include "libman.h"  #include "libman.h"
 #include "libmandoc.h"  #include "libmandoc.h"
   
Line 53  static void   man_node_free(struct man_node *);
Line 54  static void   man_node_free(struct man_node *);
 static  void             man_node_unlink(struct man *,  static  void             man_node_unlink(struct man *,
                                 struct man_node *);                                  struct man_node *);
 static  int              man_ptext(struct man *, int, char *, int);  static  int              man_ptext(struct man *, int, char *, int);
 static  int              man_pmacro(struct man *, int, char *, int);  static  int              man_pmacro(struct man *,
                                   const struct regset *regs,
                                   int, char *, int);
 static  void             man_free1(struct man *);  static  void             man_free1(struct man *);
 static  void             man_alloc1(struct man *);  static  void             man_alloc1(struct man *);
 static  int              macrowarn(struct man *, int, const char *, int);  static  int              macrowarn(struct man *, int, const char *, int);
Line 124  man_endparse(struct man *m)
Line 127  man_endparse(struct man *m)
   
   
 int  int
 man_parseln(struct man *m, int ln, char *buf, int offs)  man_parseln(struct man *m, const struct regset *regs,
                   int ln, char *buf, int offs)
 {  {
   
         if (MAN_HALT & m->flags)          if (MAN_HALT & m->flags)
                 return(0);                  return(0);
   
         return(('.' == buf[offs] || '\'' == buf[offs]) ?          return(('.' == buf[offs] || '\'' == buf[offs]) ?
                         man_pmacro(m, ln, buf, offs) :                          man_pmacro(m, regs, ln, buf, offs) :
                         man_ptext(m, ln, buf, offs));                          man_ptext(m, ln, buf, offs));
 }  }
   
Line 447  macrowarn(struct man *m, int ln, const char *buf, int 
Line 451  macrowarn(struct man *m, int ln, const char *buf, int 
   
   
 int  int
 man_pmacro(struct man *m, int ln, char *buf, int offs)  man_pmacro(struct man *m, const struct regset *regs,
                   int ln, char *buf, int offs)
 {  {
         int              i, j, ppos;          int              i, j, ppos;
         enum mant        tok;          enum mant        tok;
Line 572  man_pmacro(struct man *m, int ln, char *buf, int offs)
Line 577  man_pmacro(struct man *m, int ln, char *buf, int offs)
         /* Call to handler... */          /* Call to handler... */
   
         assert(man_macros[tok].fp);          assert(man_macros[tok].fp);
         if ( ! (*man_macros[tok].fp)(m, tok, ln, ppos, &i, buf))          if ( ! (*man_macros[tok].fp)(m, regs, tok, ln, ppos, &i, buf))
                 goto err;                  goto err;
   
 out:  out:

Legend:
Removed from v.1.75  
changed lines
  Added in v.1.78

CVSweb