Package: acedb / 4.9.39+dfsg.02-5

belvu_help.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Author: Steffen Moeller <moeller@debian.org>
Last-Update: Sun, 11 Jul 2010 06:27:12 +0200
Description: Add -h argument for help and -v for version info

--- a/w9/belvu.c
+++ b/w9/belvu.c
@@ -4914,7 +4914,8 @@ int main(int argc, char **argv)
 	output_probs = 0,
 	init_tree = 0,
 	only_tree = 0,
-        show_ann = 0;
+        show_ann = 0,
+	show_help = 0;
     float   
         makeNRinit = 0.0,
         init_rmEmptyColumns = 0.0,
@@ -4926,7 +4927,7 @@ int main(int argc, char **argv)
     int          optc;
     extern int   optind;
     extern char *optarg;
-    char        *optstring="ab:Ccgl:L:m:n:O:o:PpQ:q:RrS:s:T:t:uz:";
+    char        *optstring="ab:Ccghl:L:m:n:O:o:PpQ:q:RrS:s:T:t:uvz:";
 
     static char *cc_date = 
 #if defined(__DATE__)
@@ -4988,6 +4989,8 @@ int main(int argc, char **argv)
  -t <title>  Set window title.\n\
  -g          Draw grid line (for debugging).\n\
  -u          Start up with uncoloured alignment (faster).\n\
+ -h          Show this help.\n\
+ -v          Show version info.\n\
 \n\
  Some X options:\n\
  -acefont <font>   Main font.\n\
@@ -5011,6 +5014,7 @@ int main(int argc, char **argv)
 	case 'C': saveCoordsOn = 0;              break;
 	case 'c': verbose = 1;                   break;
 	case 'g': gridOn = 1;                    break;
+	case 'h': show_help = 1;                 break;
 	case 'l': 
 	    colorCodesFile = messalloc(strlen(optarg+1));
 	    strcpy(colorCodesFile, optarg);      break;
@@ -5089,11 +5093,15 @@ int main(int argc, char **argv)
 	case 't': 
 	    strncpy(Title, optarg, 255);         break;
 	case 'u': colorRectangles = 0;           break;
+	case 'v':
+	    fprintf(stderr,"%s",belvuVersion);
+	    exit(1);
+	                                         break;
 	case 'z': saveSeparator = *optarg;       break;
 	default : fatal("Illegal option");
 	}
 
-    if (argc-optind < 1) {
+    if (argc-optind < 1 || show_help) {
 	fprintf(stderr, "%s\n", usage); 
 	exit(1);
     }