| Revision 2058,
941 bytes
checked in by chris, 4 years ago
(diff) |
|
Fix warnings on HPPA due to assigning static strings to non-const
char *. Thanks to Reinhard Tartler and the Debian project buildds.
|
-
Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 | #!@PERL@ |
|---|
| 2 | use strict; |
|---|
| 3 | |
|---|
| 4 | print "Creating built-in documentation for bbackupquery...\n"; |
|---|
| 5 | |
|---|
| 6 | open DOC,"documentation.txt" or die "Can't open documentation.txt file"; |
|---|
| 7 | my $section; |
|---|
| 8 | my %help; |
|---|
| 9 | my @in_order; |
|---|
| 10 | |
|---|
| 11 | while(<DOC>) |
|---|
| 12 | { |
|---|
| 13 | if(m/\A>\s+(\w+)/) |
|---|
| 14 | { |
|---|
| 15 | $section = $1; |
|---|
| 16 | m/\A>\s+(.+)\Z/; |
|---|
| 17 | $help{$section} = $1."\n"; |
|---|
| 18 | push @in_order,$section; |
|---|
| 19 | } |
|---|
| 20 | elsif(m/\A</) |
|---|
| 21 | { |
|---|
| 22 | $section = ''; |
|---|
| 23 | } |
|---|
| 24 | elsif($section ne '') |
|---|
| 25 | { |
|---|
| 26 | $help{$section} .= $_; |
|---|
| 27 | } |
|---|
| 28 | } |
|---|
| 29 | |
|---|
| 30 | close DOC; |
|---|
| 31 | |
|---|
| 32 | open OUT,">autogen_Documentation.cpp" or die "Can't open output file for writing"; |
|---|
| 33 | |
|---|
| 34 | print OUT <<__E; |
|---|
| 35 | // |
|---|
| 36 | // Automatically generated file, do not edit. |
|---|
| 37 | // |
|---|
| 38 | |
|---|
| 39 | #include "Box.h" |
|---|
| 40 | |
|---|
| 41 | #include "MemLeakFindOn.h" |
|---|
| 42 | |
|---|
| 43 | const char *help_commands[] = |
|---|
| 44 | { |
|---|
| 45 | __E |
|---|
| 46 | |
|---|
| 47 | for(@in_order) |
|---|
| 48 | { |
|---|
| 49 | print OUT qq:\t"$_",\n:; |
|---|
| 50 | } |
|---|
| 51 | |
|---|
| 52 | print OUT <<__E; |
|---|
| 53 | 0 |
|---|
| 54 | }; |
|---|
| 55 | |
|---|
| 56 | const char *help_text[] = |
|---|
| 57 | { |
|---|
| 58 | __E |
|---|
| 59 | |
|---|
| 60 | for(@in_order) |
|---|
| 61 | { |
|---|
| 62 | my $t = $help{$_}; |
|---|
| 63 | $t =~ s/\t/ /g; |
|---|
| 64 | $t =~ s/\n/\\n/g; |
|---|
| 65 | $t =~ s/"/\\"/g; |
|---|
| 66 | print OUT qq:\t"$t",\n:; |
|---|
| 67 | } |
|---|
| 68 | |
|---|
| 69 | print OUT <<__E; |
|---|
| 70 | 0 |
|---|
| 71 | }; |
|---|
| 72 | |
|---|
| 73 | __E |
|---|
| 74 | |
|---|
| 75 | close OUT; |
|---|
Note: See
TracBrowser
for help on using the repository browser.