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

Diff for /mandoc/Attic/mlg.c between version 1.2 and 1.4

version 1.2, 2008/12/03 19:21:58 version 1.4, 2008/12/04 11:25:29
Line 63  struct md_mlg {
Line 63  struct md_mlg {
   
 static  void             mlg_roffmsg(void *arg, enum roffmsg,  static  void             mlg_roffmsg(void *arg, enum roffmsg,
                                 const char *, const char *, char *);                                  const char *, const char *, char *);
 static  int              mlg_roffhead(void *);  static  int              mlg_roffhead(void *, const struct tm *,
                                   const char *, const char *,
                                   const char *, const char *);
 static  int              mlg_rofftail(void *);  static  int              mlg_rofftail(void *);
 static  int              mlg_roffin(void *, int, int *, char **);  static  int              mlg_roffin(void *, int, int *, char **);
 static  int              mlg_roffdata(void *, int, char *);  static  int              mlg_roffdata(void *, int, char *);
Line 189  mlg_indent(struct md_mlg *p)
Line 191  mlg_indent(struct md_mlg *p)
 {  {
         size_t           count;          size_t           count;
   
         count = p->indent > MAXINDENT ? MAXINDENT : p->indent;          count = p->indent > MAXINDENT ? (size_t)MAXINDENT : p->indent;
         count *= INDENT;          count *= INDENT;
   
         assert(0 == p->pos);          assert(0 == p->pos);
Line 212  mlg_newline(struct md_mlg *p)
Line 214  mlg_newline(struct md_mlg *p)
 static void  static void
 mlg_mode(struct md_mlg *p, enum md_tok ns)  mlg_mode(struct md_mlg *p, enum md_tok ns)
 {  {
   
         p->flags &= ~ML_OVERRIDE_ONE;          p->flags &= ~ML_OVERRIDE_ONE;
         p->last = ns;          p->last = ns;
 }  }
Line 252  mlg_data(struct md_mlg *p, int space, char *buf)
Line 255  mlg_data(struct md_mlg *p, int space, char *buf)
                         if ( ! ml_nputstring(p->mbuf, bufp,                          if ( ! ml_nputstring(p->mbuf, bufp,
                                                 sz, &p->pos))                                                  sz, &p->pos))
                                 return(0);                                  return(0);
                         if (p->indent * MAXINDENT + sz >= COLUMNS)                          if (p->indent * INDENT + sz >= COLUMNS)
                                 if ( ! mlg_newline(p))                                  if ( ! mlg_newline(p))
                                         return(0);                                          return(0);
                         if ( ! (ML_OVERRIDE_ALL & p->flags))                          if ( ! (ML_OVERRIDE_ALL & p->flags))
Line 345  mlg_alloc(const struct md_args *args, 
Line 348  mlg_alloc(const struct md_args *args, 
   
   
 static int  static int
 mlg_roffhead(void *arg)  mlg_roffhead(void *arg, const struct tm *tm, const char *os,
                   const char *title, const char *sec, const char *vol)
 {  {
         struct md_mlg   *p;          struct md_mlg   *p;
   
Line 353  mlg_roffhead(void *arg)
Line 357  mlg_roffhead(void *arg)
         p = (struct md_mlg *)arg;          p = (struct md_mlg *)arg;
   
         mlg_mode(p, MD_BLK_IN);          mlg_mode(p, MD_BLK_IN);
         if ( ! (*p->begin)(p->mbuf, p->args))          if ( ! (*p->begin)(p->mbuf, p->args, tm, os, title, sec, vol))
                 return(0);                  return(0);
   
         p->indent++;          p->indent++;

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

CVSweb