[BACK]Return to tbl_opts.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mandoc

Diff for /src/usr.bin/mandoc/tbl_opts.c between version 1.1 and 1.2

version 1.1, 2011/01/04 22:28:17 version 1.2, 2011/01/09 14:30:48
Line 1 
Line 1 
 /*      $Id$ */  /*      $Id$ */
 /*  /*
  * Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>   * Copyright (c) 2009, 2010, 2011 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 72 
Line 72 
 };  };
   
 static  int              arg(struct tbl_node *, int,  static  int              arg(struct tbl_node *, int,
                                 const char *, int *, int);                                  const char *, int *, enum tbl_ident);
 static  void             opt(struct tbl_node *, int,  static  void             opt(struct tbl_node *, int,
                                 const char *, int *);                                  const char *, int *);
   
 static int  static int
 arg(struct tbl_node *tbl, int ln, const char *p, int *pos, int key)  arg(struct tbl_node *tbl, int ln, const char *p, int *pos, enum tbl_ident key)
 {  {
         int              i;          int              i;
         char             buf[KEY_MAXNUMSZ];          char             buf[KEY_MAXNUMSZ];
Line 102 
Line 102 
   
         switch (key) {          switch (key) {
         case (KEY_DELIM):          case (KEY_DELIM):
                 if ('\0' == (tbl->opts.delims[0] = p[(*pos)++])) {                  if ('\0' == p[(*pos)++]) {
                         TBL_MSG(tbl, MANDOCERR_TBL, ln, *pos - 1);                          TBL_MSG(tbl, MANDOCERR_TBL, ln, *pos - 1);
                         return(0);                          return(0);
                 }                  }
   
                 if ('\0' == (tbl->opts.delims[1] = p[(*pos)++])) {                  if ('\0' == p[(*pos)++]) {
                         TBL_MSG(tbl, MANDOCERR_TBL, ln, *pos - 1);                          TBL_MSG(tbl, MANDOCERR_TBL, ln, *pos - 1);
                         return(0);                          return(0);
                 }                  }
Line 188 
Line 188 
         /* Copy up to first non-alpha character. */          /* Copy up to first non-alpha character. */
   
         for (sv = *pos, i = 0; i < KEY_MAXNAME; i++, (*pos)++) {          for (sv = *pos, i = 0; i < KEY_MAXNAME; i++, (*pos)++) {
                 buf[i] = tolower(p[*pos]);                  buf[i] = tolower((unsigned char)p[*pos]);
                 if ( ! isalpha((unsigned char)buf[i]))                  if ( ! isalpha((unsigned char)buf[i]))
                         break;                          break;
         }          }

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