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

Diff for /mandoc/Attic/validate.c between version 1.3 and 1.4

version 1.3, 2008/11/30 12:41:45 version 1.4, 2008/11/30 18:50:44
Line 52  static void   roffmsg(void *arg, enum roffmsg, 
Line 52  static void   roffmsg(void *arg, enum roffmsg, 
 static  int              roffhead(void *);  static  int              roffhead(void *);
 static  int              rofftail(void *);  static  int              rofftail(void *);
 static  int              roffin(void *, int, int *, char **);  static  int              roffin(void *, int, int *, char **);
 static  int              roffdata(void *, char *);  static  int              roffdata(void *, int, char *);
 static  int              roffout(void *, int);  static  int              roffout(void *, int);
 static  int              roffblkin(void *, int, int *, char **);  static  int              roffblkin(void *, int, int *, char **);
 static  int              roffblkout(void *, int);  static  int              roffblkout(void *, int);
Line 60  static int   roffspecial(void *, int);
Line 60  static int   roffspecial(void *, int);
   
 static  int              mbuf_newline(struct md_valid *);  static  int              mbuf_newline(struct md_valid *);
 static  int              mbuf_indent(struct md_valid *);  static  int              mbuf_indent(struct md_valid *);
 static  int              mbuf_data(struct md_valid *, char *);  static  int              mbuf_data(struct md_valid *, int, char *);
   
   
 static int  static int
Line 92  mbuf_newline(struct md_valid *p)
Line 92  mbuf_newline(struct md_valid *p)
   
   
 static int  static int
 mbuf_data(struct md_valid *p, char *buf)  mbuf_data(struct md_valid *p, int space, char *buf)
 {  {
         int              space;  
         size_t           sz;          size_t           sz;
         char            *bufp;          char            *bufp;
   
         space = 1; /* FIXME */  
   
         assert(p->mbuf);          assert(p->mbuf);
         assert(0 != p->indent);          assert(0 != p->indent);
   
Line 227  roffhead(void *arg)
Line 224  roffhead(void *arg)
         assert(arg);          assert(arg);
         p = (struct md_valid *)arg;          p = (struct md_valid *)arg;
   
         if ( ! md_buf_putstring(p->mbuf, "BEGIN"))          if ( ! md_buf_putstring(p->mbuf, "<?xml version=\"1.0\" "
                                   "encoding=\"UTF-8\"?>\n"))
                 return(0);                  return(0);
         p->indent++;  
         if ( ! mbuf_newline(p))          if ( ! md_buf_putstring(p->mbuf, "<mdoc>"))
                 return(0);                  return(0);
           p->indent++;
   
         return(1);          return(mbuf_newline(p));
 }  }
   
   
Line 247  rofftail(void *arg)
Line 246  rofftail(void *arg)
   
         if (0 != p->pos && ! mbuf_newline(p))          if (0 != p->pos && ! mbuf_newline(p))
                 return(0);                  return(0);
           return(md_buf_putstring(p->mbuf, "</mdoc>\n"));
         if ( ! md_buf_putstring(p->mbuf, "END\n"))  
                 return(0);  
         return(1);  
 }  }
   
   
Line 334  roffin(void *arg, int tok, int *argcp, char **argvp)
Line 330  roffin(void *arg, int tok, int *argcp, char **argvp)
         if (0 == p->pos && ! mbuf_indent(p))          if (0 == p->pos && ! mbuf_indent(p))
                 return(0);                  return(0);
   
           /* FIXME: not always with a space... */
         if ( ! md_buf_putstring(p->mbuf, " <"))          if ( ! md_buf_putstring(p->mbuf, " <"))
                 return(0);                  return(0);
         if ( ! md_buf_putstring(p->mbuf, toknames[tok]))          if ( ! md_buf_putstring(p->mbuf, toknames[tok]))
Line 406  roffmsg(void *arg, enum roffmsg lvl, 
Line 403  roffmsg(void *arg, enum roffmsg lvl, 
   
   
 static int  static int
 roffdata(void *arg, char *buf)  roffdata(void *arg, int space, char *buf)
 {  {
         struct md_valid *p;          struct md_valid *p;
   
         assert(arg);          assert(arg);
         p = (struct md_valid *)arg;          p = (struct md_valid *)arg;
         return(mbuf_data(p, buf));          return(mbuf_data(p, space, buf));
 }  }

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

CVSweb