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

Diff for /mandoc/main.c between version 1.44 and 1.45

version 1.44, 2009/09/21 13:06:13 version 1.45, 2009/10/13 10:21:24
Line 20 
Line 20 
 #include <err.h>  #include <err.h>
 #include <fcntl.h>  #include <fcntl.h>
 #include <stdio.h>  #include <stdio.h>
   #include <stdint.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
 #include <unistd.h>  #include <unistd.h>
Line 27 
Line 28 
 #include "mdoc.h"  #include "mdoc.h"
 #include "man.h"  #include "man.h"
   
   #define UNCONST(a)      ((void *)(uintptr_t)(const void *)(a))
   
 /* Account for FreeBSD and Linux in our declarations. */  /* Account for FreeBSD and Linux in our declarations. */
   
 #ifdef __linux__  #ifdef __linux__
Line 576  static int
Line 579  static int
 foptions(int *fflags, char *arg)  foptions(int *fflags, char *arg)
 {  {
         char            *v, *o;          char            *v, *o;
         char            *toks[7];          const char      *toks[7];
   
         toks[0] = "ign-scope";          toks[0] = "ign-scope";
         toks[1] = "no-ign-escape";          toks[1] = "no-ign-escape";
Line 588  foptions(int *fflags, char *arg)
Line 591  foptions(int *fflags, char *arg)
   
         while (*arg) {          while (*arg) {
                 o = arg;                  o = arg;
                 switch (getsubopt(&arg, toks, &v)) {                  switch (getsubopt(&arg, UNCONST(toks), &v)) {
                 case (0):                  case (0):
                         *fflags |= IGN_SCOPE;                          *fflags |= IGN_SCOPE;
                         break;                          break;
Line 622  static int
Line 625  static int
 woptions(int *wflags, char *arg)  woptions(int *wflags, char *arg)
 {  {
         char            *v, *o;          char            *v, *o;
         char            *toks[3];          const char      *toks[3];
   
         toks[0] = "all";          toks[0] = "all";
         toks[1] = "error";          toks[1] = "error";
Line 630  woptions(int *wflags, char *arg)
Line 633  woptions(int *wflags, char *arg)
   
         while (*arg) {          while (*arg) {
                 o = arg;                  o = arg;
                 switch (getsubopt(&arg, toks, &v)) {                  switch (getsubopt(&arg, UNCONST(toks), &v)) {
                 case (0):                  case (0):
                         *wflags |= WARN_WALL;                          *wflags |= WARN_WALL;
                         break;                          break;

Legend:
Removed from v.1.44  
changed lines
  Added in v.1.45

CVSweb