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

Diff for /src/usr.bin/mandoc/main.c between version 1.125 and 1.126

version 1.125, 2015/02/10 08:05:07 version 1.126, 2015/02/16 16:18:02
Line 94 
Line 94 
 static  void              spawn_pager(void);  static  void              spawn_pager(void);
 static  int               toptions(struct curparse *, char *);  static  int               toptions(struct curparse *, char *);
 static  void              usage(enum argmode) __attribute__((noreturn));  static  void              usage(enum argmode) __attribute__((noreturn));
 static  void              version(void) __attribute__((noreturn));  
 static  int               woptions(struct curparse *, char *);  static  int               woptions(struct curparse *, char *);
   
 static  const int sec_prios[] = {1, 4, 5, 8, 6, 3, 7, 2, 9};  static  const int sec_prios[] = {1, 4, 5, 8, 6, 3, 7, 2, 9};
Line 247 
Line 246 
                 case 'w':                  case 'w':
                         outmode = OUTMODE_FLN;                          outmode = OUTMODE_FLN;
                         break;                          break;
                 case 'V':  
                         version();  
                         /* NOTREACHED */  
                 default:                  default:
                         show_usage = 1;                          show_usage = 1;
                         break;                          break;
Line 465 
Line 461 
 }  }
   
 static void  static void
 version(void)  
 {  
   
         printf("mandoc %s\n", VERSION);  
         exit((int)MANDOCLEVEL_OK);  
 }  
   
 static void  
 usage(enum argmode argmode)  usage(enum argmode argmode)
 {  {
   
         switch (argmode) {          switch (argmode) {
         case ARG_FILE:          case ARG_FILE:
                 fputs("usage: mandoc [-acfhklV] [-Ios=name] "                  fputs("usage: mandoc [-acfhkl] [-Ios=name] "
                     "[-Kencoding] [-mformat] [-Ooption]\n"                      "[-Kencoding] [-mformat] [-Ooption]\n"
                     "\t      [-Toutput] [-Wlevel] [file ...]\n", stderr);                      "\t      [-Toutput] [-Wlevel] [file ...]\n", stderr);
                 break;                  break;
         case ARG_NAME:          case ARG_NAME:
                 fputs("usage: man [-acfhklVw] [-C file] [-I os=name] "                  fputs("usage: man [-acfhklw] [-C file] [-I os=name] "
                     "[-K encoding] [-M path] [-m path]\n"                      "[-K encoding] [-M path] [-m path]\n"
                     "\t   [-O option=value] [-S subsection] [-s section] "                      "\t   [-O option=value] [-S subsection] [-s section] "
                     "[-T output] [-W level]\n"                      "[-T output] [-W level]\n"
                     "\t   [section] name ...\n", stderr);                      "\t   [section] name ...\n", stderr);
                 break;                  break;
         case ARG_WORD:          case ARG_WORD:
                 fputs("usage: whatis [-acfhklVw] [-C file] "                  fputs("usage: whatis [-acfhklw] [-C file] "
                     "[-M path] [-m path] [-O outkey] [-S arch]\n"                      "[-M path] [-m path] [-O outkey] [-S arch]\n"
                     "\t      [-s section] name ...\n", stderr);                      "\t      [-s section] name ...\n", stderr);
                 break;                  break;
         case ARG_EXPR:          case ARG_EXPR:
                 fputs("usage: apropos [-acfhklVw] [-C file] "                  fputs("usage: apropos [-acfhklw] [-C file] "
                     "[-M path] [-m path] [-O outkey] [-S arch]\n"                      "[-M path] [-m path] [-O outkey] [-S arch]\n"
                     "\t       [-s section] expression ...\n", stderr);                      "\t       [-s section] expression ...\n", stderr);
                 break;                  break;

Legend:
Removed from v.1.125  
changed lines
  Added in v.1.126