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

Diff for /mandoc/main.c between version 1.151 and 1.153

version 1.151, 2011/03/16 15:28:35 version 1.153, 2011/03/17 12:08:01
Line 233  static void    fdesc(struct curparse *);
Line 233  static void    fdesc(struct curparse *);
 static  void              ffile(const char *, struct curparse *);  static  void              ffile(const char *, struct curparse *);
 static  int               pfile(const char *, struct curparse *);  static  int               pfile(const char *, struct curparse *);
 static  int               moptions(enum intt *, char *);  static  int               moptions(enum intt *, char *);
 static  int               mmsg(enum mandocerr, void *,  static  void              mmsg(enum mandocerr, void *,
                                 int, int, const char *);                                  int, int, const char *);
 static  void              pset(const char *, int, struct curparse *);  static  void              pset(const char *, int, struct curparse *);
 static  int               toptions(struct curparse *, char *);  static  int               toptions(struct curparse *, char *);
Line 405  resize_buf(struct buf *buf, size_t initial)
Line 405  resize_buf(struct buf *buf, size_t initial)
 {  {
   
         buf->sz = buf->sz > initial/2 ? 2 * buf->sz : initial;          buf->sz = buf->sz > initial/2 ? 2 * buf->sz : initial;
         buf->buf = realloc(buf->buf, buf->sz);          buf->buf = mandoc_realloc(buf->buf, buf->sz);
         if (NULL == buf->buf) {  
                 perror(NULL);  
                 exit((int)MANDOCLEVEL_SYSERR);  
         }  
 }  }
   
   
Line 1040  woptions(struct curparse *curp, char *arg)
Line 1036  woptions(struct curparse *curp, char *arg)
         return(1);          return(1);
 }  }
   
 static int  static void
 mmsg(enum mandocerr t, void *arg, int ln, int col, const char *msg)  mmsg(enum mandocerr t, void *arg, int ln, int col, const char *msg)
 {  {
         struct curparse *cp;          struct curparse *cp;
Line 1053  mmsg(enum mandocerr t, void *arg, int ln, int col, con
Line 1049  mmsg(enum mandocerr t, void *arg, int ln, int col, con
   
         cp = (struct curparse *)arg;          cp = (struct curparse *)arg;
         if (level < cp->wlevel)          if (level < cp->wlevel)
                 return(1);                  return;
   
         fprintf(stderr, "%s:%d:%d: %s: %s",          fprintf(stderr, "%s:%d:%d: %s: %s",
             cp->file, ln, col + 1, mandoclevels[level], mandocerrs[t]);              cp->file, ln, col + 1, mandoclevels[level], mandocerrs[t]);
Line 1063  mmsg(enum mandocerr t, void *arg, int ln, int col, con
Line 1059  mmsg(enum mandocerr t, void *arg, int ln, int col, con
   
         if (cp->file_status < level)          if (cp->file_status < level)
                 cp->file_status = level;                  cp->file_status = level;
   
         return(level < MANDOCLEVEL_FATAL);  
 }  }

Legend:
Removed from v.1.151  
changed lines
  Added in v.1.153

CVSweb