equal
deleted
inserted
replaced
|
1 #!/usr/local/bin/perl |
|
2 # unused in NT but there for completeness |
|
3 |
|
4 # Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
5 # All rights reserved. |
|
6 # This component and the accompanying materials are made available |
|
7 # under the terms of "Eclipse Public License v1.0" |
|
8 # which accompanies this distribution, and is available |
|
9 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
10 # |
|
11 # Initial Contributors: |
|
12 # Nokia Corporation - initial contribution. |
|
13 # |
|
14 # Contributors: |
|
15 # |
|
16 # Description: |
|
17 # Configures the index.hhc file for generating compiled html help |
|
18 # by removing lines that should not be displayed |
|
19 |
|
20 # Usage: configureIndex index.hhc > index.hhc |
|
21 |
|
22 if ($#ARGV != 0) |
|
23 { |
|
24 die "Usage: configureIndex index.hhc > index.hhc\n"; |
|
25 } |
|
26 |
|
27 $file=shift(@ARGV); |
|
28 open (FILE, $file) or die "Can't open $file: $!\n"; |
|
29 my $printLine = 1; |
|
30 my $inRelatedPages = 0; |
|
31 my $compoundMembersLine = "\n"; |
|
32 while (<FILE>) |
|
33 { |
|
34 if (/^<LI>.*/) |
|
35 { |
|
36 if (/.*Compound List.*/ || /.*Namespace List.*/ || |
|
37 /.*Namespace Members.*/ || /.*File Members.*/) |
|
38 { |
|
39 $printLine = 0; |
|
40 } |
|
41 elsif ( /.*Compound Members.*/) |
|
42 { |
|
43 $compoundMembersLine = $_; |
|
44 ##print $compoundMembersLine; |
|
45 } |
|
46 else |
|
47 { |
|
48 if (/.*Related Pages.*/) |
|
49 { |
|
50 $inRelatedPages = 1; |
|
51 } |
|
52 $printLine = 1; |
|
53 print $_; |
|
54 } |
|
55 } |
|
56 elsif ( /^\s*<\/UL>$/ && $inRelatedPages == 1) |
|
57 { |
|
58 $inRelatedPages = 0; |
|
59 print " "; |
|
60 print $compoundMembersLine; |
|
61 print $_; |
|
62 } |
|
63 else |
|
64 { |
|
65 if ($printLine == 1) |
|
66 { |
|
67 print $_; |
|
68 } |
|
69 } |
|
70 } |
|
71 close FILE; |