3 # This script is used by the config-file target in GNUMakefile.
5 # It removes garbage in the w3m output and separates comments
6 # and active directives.
17 s/^1\. \@\@TITLE\@\@/ /i;
19 if (m/^(\d\.)(\d\.)(\d\.)?\s/) {
20 # Remove the first digit as it's the
21 # config file section in the User Manual.
24 # If it's a section header, uppercase it.
25 $_ = uc() if (/^\d\.\s+/);
27 # Remember to underline it.
29 $header_len = length($_);
34 # XXX: someone should figure out what this stuff
35 # is supposed to do (and if it really does that).
36 s/^# #/####/ if /^# #{12,}/;
37 s/^.*$// if $hit_option;
42 $hit_option = 1 if s/^#\s+@@//;
47 # The previous line was a section
48 # header so we better underline it.
49 die "Invalid header length" unless defined $header_len;
50 print "# " . "=" x $header_len . "\n";