Debian Codegraph @

debian/patches/03_unpaged-help

raw
1 Description: adds the posibility to use an unpaged --help output
2 Origin: upstream, commit:fcee00ee
3 Bug-Debian: http://bugs.debian.org/424978
4 Author: David Lichteblau <[email protected]>
5
6 Index: ldapvi-1.7/arguments.c
7 ===================================================================
8 --- ldapvi-1.7.orig/arguments.c
9 +++ ldapvi-1.7/arguments.c
10 @@ -115,7 +115,7 @@ enum ldapvi_option_numbers {
11 OPTION_NOQUESTIONS, OPTION_LDAPSEARCH, OPTION_LDAPMODIFY,
12 OPTION_LDAPDELETE, OPTION_LDAPMODDN, OPTION_LDAPMODRDN, OPTION_ADD,
13 OPTION_CONFIG, OPTION_READ, OPTION_LDAP_CONF, OPTION_BIND,
14 - OPTION_BIND_DIALOG
15 + OPTION_BIND_DIALOG, OPTION_UNPAGED_HELP
16 };
17
18 static struct poptOption options[] = {
19 @@ -170,14 +170,17 @@ static struct poptOption options[] = {
20 {"ldapdelete", 0, 0, 0, OPTION_LDAPDELETE, 0, 0},
21 {"ldapmoddn", 0, 0, 0, OPTION_LDAPMODDN, 0, 0},
22 {"ldapmodrdn", 0, 0, 0, OPTION_LDAPMODRDN, 0, 0},
23 + {"unpaged-help", 0, 0, 0, OPTION_UNPAGED_HELP, 0, 0},
24 {0, 0, 0, 0, 0}
25 };
26
27
28 +static int usage_pagerp = 1;
29 +
30 void
31 usage(int fd, int rc)
32 {
33 - if (fd == -1 && rc == 0 && isatty(1)) {
34 + if (usage_pagerp && fd == -1 && rc == 0 && isatty(1)) {
35 int fd;
36 int pid = pipeview(&fd);
37 write(fd, USAGE, strlen(USAGE));
38 @@ -479,6 +482,9 @@ parse_argument(int c, char *arg, cmdline
39 case OPTION_LDAP_CONF:
40 result->profileonlyp = 0;
41 break;
42 + case OPTION_UNPAGED_HELP:
43 + usage_pagerp = 0;
44 + break;
45 case 'p':
46 parse_configuration(arg, result, ctrls);
47 break;
48 Index: ldapvi-1.7/manual/manual.xml
49 ===================================================================
50 --- ldapvi-1.7.orig/manual/manual.xml
51 +++ ldapvi-1.7/manual/manual.xml
52 @@ -718,6 +718,10 @@ wofuer was das doch gleich da?
53 suppress-configuration="suppress-configuration">
54 Print help on command line arguments.
55 </parameter>
56 + <parameter long="unpaged-help" brief="Disable pager for --help">
57 + Disable the use of a pager
58 + for <a href="#parameter-rename"><tt>--help</tt></a>.
59 + </parameter>
60 <parameter long="deleteoldrdn" brief="Delete the old RDN">
61 When changing the relative distinguished name to a new attribute
62 value, delete the old attribute value instead of keeping it.
63 Index: ldapvi-1.7/NEWS
64 ===================================================================
65 --- ldapvi-1.7.orig/NEWS
66 +++ ldapvi-1.7/NEWS
67 @@ -1,3 +1,6 @@
68 +1.8 2007-mm-dd
69 + - new configuration option `unpaged-help'
70 +
71 1.7 2007-05-05
72 - Fixed buffer overrun in home_filename(), thanks to Thomas Friebel.
73