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

Diff for /mandoc/chars.c between version 1.10 and 1.13

version 1.10, 2009/10/30 18:43:24 version 1.13, 2009/11/05 07:21:01
Line 35  struct ln {
Line 35  struct ln {
         int               type;          int               type;
 #define CHARS_CHAR       (1 << 0)  #define CHARS_CHAR       (1 << 0)
 #define CHARS_STRING     (1 << 1)  #define CHARS_STRING     (1 << 1)
 #define CHARS_BOTH       (0x03)  #define CHARS_BOTH       (CHARS_CHAR | CHARS_STRING)
 };  };
   
 #define LINES_MAX         351  #define LINES_MAX         351
Line 47  struct ln {
Line 47  struct ln {
 #define BOTH(w, x, y, z, a, b) \  #define BOTH(w, x, y, z, a, b) \
         { NULL, (w), (y), (a), (x), (z), (b), CHARS_BOTH },          { NULL, (w), (y), (a), (x), (z), (b), CHARS_BOTH },
   
 static  struct ln lines[LINES_MAX] = {  #define CHAR_TBL_START    static struct ln lines[LINES_MAX] = {
   #define CHAR_TBL_END      };
   
 #include "chars.in"  #include "chars.in"
 };  
   
 struct  tbl {  struct  tbl {
         enum chars        type;          enum chars        type;
Line 91  chars_init(enum chars type)
Line 92  chars_init(enum chars type)
   
         tab = malloc(sizeof(struct tbl));          tab = malloc(sizeof(struct tbl));
         if (NULL == tab) {          if (NULL == tab) {
                 fprintf(stderr, "memory exhausted\n");                  perror(NULL);
                 exit(EXIT_FAILURE);                  exit(EXIT_FAILURE);
         }          }
   
         htab = calloc(PRINT_HI - PRINT_LO + 1, sizeof(struct ln **));          htab = calloc(PRINT_HI - PRINT_LO + 1, sizeof(struct ln **));
         if (NULL == htab) {          if (NULL == htab) {
                 fprintf(stderr, "memory exhausted\n");                  perror(NULL);
                 exit(EXIT_FAILURE);                  exit(EXIT_FAILURE);
         }          }
   

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.13

CVSweb