annotate runtime/doc/makehtml.awk @ 18678:cb4a4b71df4a

Added tag v8.1.2330 for changeset 953e83e09e7847b87f1538e82e505b37ae73af1b
author Bram Moolenaar <Bram@vim.org>
date Thu, 21 Nov 2019 21:00:05 +0100
parents c8680debe1cc
children 74e3316c1d5a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 BEGIN {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 # some initialization variables
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 asciiart="no";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 wasset="no";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 lineset=0;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 sample="no";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 while ( getline ti <"tags.ref" > 0 ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 nf=split(ti,tag," ");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 tagkey[tag[1]]="yes";tagref[tag[1]]=tag[2];
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 skip_word["and"]="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 skip_word["backspace"]="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 skip_word["beep"]="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 skip_word["bugs"]="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 skip_word["da"]="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 skip_word["end"]="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 skip_word["ftp"]="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 skip_word["go"]="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 skip_word["help"]="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 skip_word["home"]="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 skip_word["news"]="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 skip_word["index"]="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 skip_word["insert"]="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 skip_word["into"]="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 skip_word["put"]="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 skip_word["reference"]="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 skip_word["section"]="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 skip_word["space"]="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 skip_word["starting"]="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 skip_word["toggle"]="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 skip_word["various"]="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 skip_word["version"]="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 skip_word["is"]="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 # protect special chars
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 /[><&á]/ {gsub(/&/,"\\&amp;");gsub(/>/,"\\&gt;");gsub(/</,"\\&lt;");gsub("á","\\&aacute;");}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 # end of sample lines by non-blank in first column
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 sample == "yes" && substr($0,1,4) == "&lt;" { sample = "no"; gsub(/^&lt;/, " "); }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 sample == "yes" && substr($0,1,1) != " " && substr($0,1,1) != " " && length($0) > 0 { sample = "no" }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 # sample lines printed bold unless empty...
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 sample == "yes" && $0 =="" { print ""; next; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 sample == "yes" && $0 !="" { print "<B>" $0 "</B>"; next; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 # start of sample lines in next line
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 $0 == "&gt;" { sample = "yes"; print ""; next; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 substr($0,length($0)-4,5) == " &gt;" { sample = "yes"; gsub(/ &gt;$/, ""); }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 # header lines printed bold, colored
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 substr($0,length($0),1) == "~" { print "<B><FONT COLOR=\"PURPLE\">" substr($0,1,length($0)-1) "</FONT></B>"; next; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 #ad hoc code
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 /^"\|\& / {gsub(/\|/,"\\&#124;"); }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 / = b / {gsub(/ b /," \\&#98; "); }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 # one letter tag
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 /[ ]\*.\*[ ]/ {gsub(/\*/,"ZWWZ"); }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 # isolated "*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 /[ ]\*[ ]/ {gsub(/ \* /," \\&#42; ");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 gsub(/ \* /," \\&#42; ");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 gsub(/ \* /," \\&#42; ");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 gsub(/ \* /," \\&#42; "); }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 # tag start
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 /[ ]\*[^ ]/ {gsub(/ \*/," ZWWZ");gsub(/ \*/," ZWWZ");}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 /^\*[^ ]/ {gsub(/^\*/,"ZWWZ");}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 # tag end
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 /[^ ]\*$/ {gsub(/\*$/,"ZWWZ");}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 /[^ \/ ]\*[ ]/ {gsub(/\*/,"ZWWZ");}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 # isolated "|"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 /[ ]\|[ ]/ {gsub(/ \| /," \\&#124; ");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 gsub(/ \| /," \\&#124; ");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 gsub(/ \| /," \\&#124; ");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 gsub(/ \| /," \\&#124; "); }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 /'\|'/ { gsub(/'\|'/,"'\\&#124;'"); }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 /\^V\|/ {gsub(/\^V\|/,"^V\\&#124;");}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 / \\\| / {gsub(/\|/,"\\&#124;");}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 # one letter pipes and "||" false pipe (digraphs)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 /[ ]\|.\|[ ]/ && asciiart == "no" {gsub(/\|/,"YXXY"); }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 /^\|.\|[ ]/ {gsub(/\|/,"YXXY"); }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 /\|\|/ {gsub(/\|\|/,"\\&#124;\\&#124;"); }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 /^shellpipe/ {gsub(/\|/,"\\&#124;"); }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 # pipe start
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 /[ ]\|[^ ]/ && asciiart == "no" {gsub(/ \|/," YXXY");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 gsub(/ \|/," YXXY");}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 /^\|[^ ]/ {gsub(/^\|/,"YXXY");}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 # pipe end
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 /[^ ]\|$/ && asciiart == "no" {gsub(/\|$/,"YXXY");}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 /[^ ]\|[s ,.); ]/ && asciiart == "no" {gsub(/\|/,"YXXY");}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 /[^ ]\|]/ && asciiart == "no" {gsub(/\|/,"YXXY");}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 # various
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 /'"/ {gsub(/'"/,"\\&#39;\\&#34;'");}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 /"/ {gsub(/"/,"\\&quot;");}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 /%/ {gsub(/%/,"\\&#37;");}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 NR == 1 { nf=split(FILENAME,f,".")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 print "<HTML>";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 print "<HEAD>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 if ( FILENAME == "mbyte.txt" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 # needs utf-8 as uses many languages
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 print "<META HTTP-EQUIV=\"Content-type\" content=\"text/html; charset=UTF-8\">";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 } else {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 # common case - Latin1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 print "<META HTTP-EQUIV=\"Content-type\" content=\"text/html; charset=ISO-8859-1\">";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 print "<TITLE>Vim documentation: " f[1] "</TITLE>";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 print "</HEAD>";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 print "<BODY BGCOLOR=\"#ffffff\">";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 print "<H1>Vim documentation: " f[1] "</H1>";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 print "<A NAME=\"top\"></A>";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 if ( FILENAME != "help.txt" ) {
790
c8680debe1cc updated for version 7.0230
vimboss
parents: 694
diff changeset
138 print "<A HREF=\"index.html\">main help file</A>\n";
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 print "<HR>";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 print "<PRE>";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 filename=f[1]".html";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 # set to a low value to test for few lines of text
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 # NR == 99999 { exit; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 # ignore underlines and tags
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 substr($0,1,5) == " vim:" { next; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 substr($0,1,4) == "vim:" { next; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 # keep just whole lines of "-", "="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 substr($0,1,3) == "===" && substr($0,75,1) != "=" { next; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 substr($0,1,3) == "---" && substr($0,75,1) != "-" { next; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 nstar = split($0,s,"ZWWZ");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157 for ( i=2 ; i <= nstar ; i=i+2 ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158 nbla=split(s[i],blata,"[ ]");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 if ( nbla > 1 ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 gsub("ZWWZ","*");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 nstar = split($0,s,"ZWWZ");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 npipe = split($0,p,"YXXY");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 for ( i=2 ; i <= npipe ; i=i+2 ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 nbla=split(p[i],blata,"[ ]");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 if ( nbla > 1 ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 gsub("YXXY","|");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169 ntabs = split($0,p,"YXXY");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 FILENAME == "gui.txt" && asciiart == "no" \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176 && $0 ~ /\+----/ && $0 ~ /----\+/ {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177 asciiart= "yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 asciicnt=0;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 FILENAME == "quotes.txt" && asciiart == "no" \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 && $0 ~ /In summary:/ {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183 asciiart= "yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184 asciicnt=0;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 FILENAME == "usr_20.txt" && asciiart == "no" \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 && $0 ~ /an empty line at the end:/ {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189 asciiart= "yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190 asciicnt=0;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193 asciiart == "yes" && $0=="" { asciicnt++; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 asciiart == "yes" && asciicnt == 2 { asciiart = "no"; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197 asciiart == "yes" { npipe = 1; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 # { print NR " <=> " asciiart; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201 # line contains "*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203 nstar > 2 && npipe < 3 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204 printf("\n");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205 for ( i=1; i <= nstar ; i=i+2 ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206 this=s[i];
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207 put_this();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208 ii=i+1;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209 nbla = split(s[ii],blata," ");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210 if ( ii <= nstar ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
211 if ( nbla == 1 && substr(s[ii],length(s[ii]),1) != " " ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
212 printf("*<A NAME=\"%s\"></A>",s[ii]);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
213 printf("<B>%s</B>*",s[ii]);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
214 } else {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
215 printf("*%s*",s[ii]);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
216 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
217 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
218 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
219 printf("\n");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
220 next;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
221 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
222 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
223 # line contains "|"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
224 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
225 npipe > 2 && nstar < 3 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
226 if ( npipe%2 == 0 ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227 for ( i=1; i < npipe ; i++ ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
228 gsub("ZWWZ","*",p[i]);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
229 printf("%s|",p[i]);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
230 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
231 printf("%s\n",p[npipe]);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
232 next;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
233 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
234 for ( i=1; i <= npipe ; i++ )
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
235 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
236 if ( i % 2 == 1 ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
237 gsub("ZWWZ","*",p[i]);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
238 this=p[i];
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
239 put_this();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
240 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
241 else {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
242 nfn=split(p[i],f,".");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
243 if ( nfn == 1 || f[2] == "" || f[1] == "" || length(f[2]) < 3 ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
244 find_tag1();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
245 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
246 else {
790
c8680debe1cc updated for version 7.0230
vimboss
parents: 694
diff changeset
247 if ( f[1] == "index" ) {
c8680debe1cc updated for version 7.0230
vimboss
parents: 694
diff changeset
248 printf "|<A HREF=\"vimindex.html\">" p[i] "</A>|";
c8680debe1cc updated for version 7.0230
vimboss
parents: 694
diff changeset
249 } else {
c8680debe1cc updated for version 7.0230
vimboss
parents: 694
diff changeset
250 if ( f[1] == "help" ) {
c8680debe1cc updated for version 7.0230
vimboss
parents: 694
diff changeset
251 printf "|<A HREF=\"index.html\">" p[i] "</A>|";
c8680debe1cc updated for version 7.0230
vimboss
parents: 694
diff changeset
252 } else {
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
253 printf "|<A HREF=\"" f[1] ".html\">" p[i] "</A>|";
790
c8680debe1cc updated for version 7.0230
vimboss
parents: 694
diff changeset
254 }
c8680debe1cc updated for version 7.0230
vimboss
parents: 694
diff changeset
255 }
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
256 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
257 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
258 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
259 printf("\n");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
260 next;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
261 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
262 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
263 # line contains both "|" and "*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
264 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
265 npipe > 2 && nstar > 2 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
266 printf("\n");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
267 for ( j=1; j <= nstar ; j=j+2 ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
268 npipe = split(s[j],p,"YXXY");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
269 if ( npipe > 1 ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
270 for ( np=1; np<=npipe; np=np+2 ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
271 this=p[np];
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
272 put_this();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
273 i=np+1;find_tag1();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
274 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
275 } else {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
276 this=s[j];
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
277 put_this();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
278 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
279 jj=j+1;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
280 nbla = split(s[jj],blata," ");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
281 if ( jj <= nstar && nbla == 1 && s[jj] != "" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
282 printf("*<A NAME=\"%s\"></A>",s[jj]);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
283 printf("<B>%s</B>*",s[jj]);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
284 } else {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
285 if ( s[jj] != "" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
286 printf("*%s*",s[jj]);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
287 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
288 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
289 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
290 printf("\n");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
291 next;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
292 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
293 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
294 # line contains e-mail address john.doe@some.place.edu
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
295 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
296 $0 ~ /@/ && $0 ~ /[a-zA-Z0-9]@[a-z]/ \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
297 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
298 nemail=split($0,em," ");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
299 if ( substr($0,1,1) == " " ) { printf(" "); }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
300 for ( i=1; i <= nemail; i++ ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
301 if ( em[i] ~ /@/ ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
302 if ( substr(em[i],2,3) == "lt;" && substr(em[i],length(em[i])-2,3) == "gt;" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
303 mailaddr=substr(em[i],5,length(em[i])-8);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
304 printf("<A HREF=\"mailto:%s\">&lt;%s&gt;</A> ",mailaddr,mailaddr);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
305 } else {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
306 if ( substr(em[i],2,3) == "lt;" && substr(em[i],length(em[i])-3,3) == "gt;" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
307 mailaddr=substr(em[i],5,length(em[i])-9);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
308 printf("<A HREF=\"mailto:%s\">&lt;%s&gt;</A>%s ",mailaddr,mailaddr,substr(em[i],length(em[i]),1));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
309 } else {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
310 printf("<A HREF=\"mailto:%s\">%s</A> ",em[i],em[i]);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
311 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
312 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
313 } else {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
314 printf("%s ",em[i]);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
315 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
316 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
317 #print "*** " NR " " FILENAME " - possible mail ref";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
318 printf("\n");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
319 next;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
320 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
321 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
322 # line contains http / ftp reference
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
323 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
324 $0 ~ /http:\/\// || $0 ~ /ftp:\/\// {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
325 gsub("URL:","");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
326 gsub("&lt;","");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
327 gsub("&gt;","");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
328 gsub("\\(","");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
329 gsub("\\)","");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
330 nemail=split($0,em," ");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
331 for ( i=1; i <= nemail; i++ ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
332 if ( substr(em[i],1,5) == "http:" ||
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
333 substr(em[i],1,4) == "ftp:" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
334 if ( substr(em[i],length(em[i]),1) != "." ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
335 printf(" <A HREF=\"%s\">%s</A>",em[i],em[i]);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
336 } else {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
337 em[i]=substr(em[i],1,length(em[i])-1);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
338 printf(" <A HREF=\"%s\">%s</A>.",em[i],em[i]);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
339 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
340 } else {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
341 printf(" %s",em[i]);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
342 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
343 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
344 #print "*** " NR " " FILENAME " - possible http ref";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
345 printf("\n");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
346 next;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
347 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
348 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
349 # some lines contains just one "almost regular" "*"...
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
350 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
351 nstar == 2 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
352 this=s[1];
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
353 put_this();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
354 printf("*");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
355 this=s[2];
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
356 put_this();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
357 printf("\n");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
358 next;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
359 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
360 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
361 # regular line
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
362 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
363 { ntabs = split($0,tb," ");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
364 for ( i=1; i < ntabs ; i++) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
365 this=tb[i];
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
366 put_this();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
367 printf(" ");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
368 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
369 this=tb[ntabs];
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
370 put_this();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
371 printf("\n");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
372 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
373
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
374
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
375 asciiart == "yes" && $0 ~ /\+-\+--/ \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
376 && $0 ~ "scrollbar" { asciiart = "no"; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
377
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
378 END {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
379 topback();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
380 print "</PRE>\n</BODY>\n\n\n</HTML>"; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
381
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
382 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
383 # as main we keep index.txt (by default)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
384 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
385 function topback () {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
386 if ( FILENAME != "tags" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
387 if ( FILENAME != "help.txt" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
388 printf("<A HREF=\"#top\">top</A> - ");
790
c8680debe1cc updated for version 7.0230
vimboss
parents: 694
diff changeset
389 printf("<A HREF=\"index.html\">main help file</A>\n");
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
390 } else {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
391 printf("<A HREF=\"#top\">top</A>\n");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
392 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
393 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
394 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
395
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
396 function find_tag1() {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
397 if ( p[i] == "" ) { return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
398 if ( tagkey[p[i]] == "yes" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
399 which=tagref[p[i]];
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
400 put_href();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
401 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
402 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
403 # if not found, then we have a problem
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
404 print "============================================" >>"errors.log";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
405 print FILENAME ", line " NR ", pointer: >>" p[i] "<<" >>"errors.log";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
406 print $0 >>"errors.log";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
407 which="intro.html";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
408 put_href();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
409 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
410
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
411 function see_tag() {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
412 # ad-hoc code:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
413 if ( atag == "\"--" || atag == "--\"" ) { return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
414 if_already();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
415 if ( already == "yes" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
416 printf("%s",aword);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
417 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
418 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
419 allow_one_char="no";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
420 find_tag2();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
421 if ( done == "yes" ) { return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
422 rightchar=substr(atag,length(atag),1);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
423 if ( rightchar == "." \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
424 || rightchar == "," \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
425 || rightchar == ":" \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
426 || rightchar == ";" \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
427 || rightchar == "!" \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
428 || rightchar == "?" \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
429 || rightchar == ")" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
430 atag=substr(atag,1,length(atag)-1);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
431 if_already();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
432 if ( already == "yes" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
433 printf("%s",aword);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
434 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
435 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
436 find_tag2();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
437 if ( done == "yes" ) { printf("%s",rightchar);return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
438 leftchar=substr(atag,1,1);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
439 lastbut1=substr(atag,length(atag),1);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
440 if ( leftchar == "'" && lastbut1 == "'" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
441 allow_one_char="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
442 atag=substr(atag,2,length(atag)-2);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
443 if_already();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
444 if ( already == "yes" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
445 printf("%s",aword);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
446 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
447 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
448 printf("%s",leftchar);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
449 aword=substr(atag,1,length(atag))""lastbut1""rightchar;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
450 find_tag2();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
451 if ( done == "yes" ) { printf("%s%s",lastbut1,rightchar);return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
452 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
453 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
454 atag=aword;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
455 leftchar=substr(atag,1,1);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
456 if ( leftchar == "'" && rightchar == "'" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
457 allow_one_char="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
458 atag=substr(atag,2,length(atag)-2);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
459 if ( atag == "<" ) { printf(" |%s|%s| ",atag,p[2]); }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
460 if_already();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
461 if ( already == "yes" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
462 printf("%s",aword);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
463 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
464 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
465 printf("%s",leftchar);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
466 find_tag2();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
467 if ( done == "yes" ) { printf("%s",rightchar);return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
468 printf("%s%s",atag,rightchar);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
469 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
470 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
471 last2=substr(atag,length(atag)-1,2);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
472 first2=substr(atag,1,2);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
473 if ( first2 == "('" && last2 == "')" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
474 allow_one_char="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
475 atag=substr(atag,3,length(atag)-4);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
476 if_already();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
477 if ( already == "yes" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
478 printf("%s",aword);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
479 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
480 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
481 printf("%s",first2);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
482 find_tag2();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
483 if ( done == "yes" ) { printf("%s",last2);return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
484 printf("%s%s",atag,last2);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
485 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
486 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
487 if ( last2 == ".)" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
488 atag=substr(atag,1,length(atag)-2);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
489 if_already();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
490 if ( already == "yes" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
491 printf("%s",aword);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
492 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
493 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
494 find_tag2();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
495 if ( done == "yes" ) { printf("%s",last2);return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
496 printf("%s%s",atag,last2);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
497 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
498 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
499 if ( last2 == ")." ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
500 atag=substr(atag,1,length(atag)-2);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
501 find_tag2();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
502 if_already();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
503 if ( already == "yes" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
504 printf("%s",aword);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
505 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
506 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
507 if ( done == "yes" ) { printf("%s",last2);return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
508 printf("%s%s",atag,last2);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
509 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
510 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
511 first6=substr(atag,1,6);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
512 last6=substr(atag,length(atag)-5,6);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
513 if ( last6 == atag ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
514 printf("%s",aword);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
515 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
516 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
517 last6of7=substr(atag,length(atag)-6,6);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
518 if ( first6 == "&quot;" && last6of7 == "&quot;" && length(atag) > 12 ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
519 allow_one_char="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
520 atag=substr(atag,7,length(atag)-13);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
521 if_already();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
522 if ( already == "yes" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
523 printf("%s",aword);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
524 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
525 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
526 printf("%s",first6);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
527 find_tag2();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
528 if ( done == "yes" ) { printf("&quot;%s",rightchar); return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
529 printf("%s&quot;%s",atag,rightchar);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
530 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
531 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
532 if ( first6 == "&quot;" && last6 != "&quot;" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
533 allow_one_char="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
534 atag=substr(atag,7,length(atag)-6);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
535 if ( atag == "[" ) { printf("&quot;%s",atag); return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
536 if ( atag == "." ) { printf("&quot;%s",atag); return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
537 if ( atag == ":" ) { printf("&quot;%s",atag); return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
538 if ( atag == "a" ) { printf("&quot;%s",atag); return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
539 if ( atag == "A" ) { printf("&quot;%s",atag); return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
540 if ( atag == "g" ) { printf("&quot;%s",atag); return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
541 if_already();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
542 if ( already == "yes" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
543 printf("&quot;%s",atag);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
544 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
545 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
546 printf("%s",first6);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
547 find_tag2();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
548 if ( done == "yes" ) { return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
549 printf("%s",atag);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
550 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
551 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
552 if ( last6 == "&quot;" && first6 == "&quot;" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
553 allow_one_char="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
554 atag=substr(atag,7,length(atag)-12);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
555 if_already();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
556 if ( already == "yes" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
557 printf("%s",aword);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
558 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
559 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
560 printf("%s",first6);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
561 find_tag2();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
562 if ( done == "yes" ) { printf("%s",last6);return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
563 printf("%s%s",atag,last6);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
564 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
565 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
566 last6of7=substr(atag,length(atag)-6,6);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
567 if ( last6of7 == "&quot;" && first6 == "&quot;" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
568 allow_one_char="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
569 atag=substr(atag,7,length(atag)-13);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
570 #printf("\natag=%s,aword=%s\n",atag,aword);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
571 if_already();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
572 if ( already == "yes" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
573 printf("%s",aword);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
574 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
575 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
576 printf("%s",first6);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
577 find_tag2();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
578 if ( done == "yes" ) { printf("%s%s",last6of7,rightchar);return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
579 printf("%s%s%s",atag,last6of7,rightchar);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
580 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
581 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
582 printf("%s",aword);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
583 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
584
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
585 function find_tag2() {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
586 done="no";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
587 # no blanks present in a tag...
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
588 ntags=split(atag,blata,"[ ]");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
589 if ( ntags > 1 ) { return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
590 if ( ( allow_one_char == "no" ) && \
694
07d199fe02ed updated for version 7.0209
vimboss
parents: 7
diff changeset
591 ( index("!#$%&'()+,-./0:;=?@ACINX\\[\\]^_`at\\{\\}~",atag) !=0 ) ) {
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
592 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
593 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
594 if ( skip_word[atag] == "yes" ) { return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
595 if ( wasset == "yes" && lineset == NR ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
596 wasset="no";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
597 see_opt();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
598 if ( done_opt == "yes" ) {return;}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
599 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
600 if ( wasset == "yes" && lineset != NR ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
601 wasset="no";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
602 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
603 if ( atag == ":set" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
604 wasset="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
605 lineset=NR;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
606 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
607 if ( tagkey[atag] == "yes" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
608 which=tagref[atag];
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
609 put_href2();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
610 done="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
611 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
612 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
613
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
614 function find_tag3() {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
615 done="no";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
616 # no blanks present in a tag...
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
617 ntags=split(btag,blata,"[ ]");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
618 if ( ntags > 1 ) { return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
619 if ( ( allow_one_char == "no" ) && \
694
07d199fe02ed updated for version 7.0209
vimboss
parents: 7
diff changeset
620 ( index("!#$%&'()+,-./0:;=?@ACINX\\[\\]^_`at\\{\\}~",btag) !=0 ) ) {
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
621 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
622 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
623 if ( skip_word[btag] == "yes" ) { return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
624 if ( tagkey[btag] == "yes" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
625 which=tagref[btag];
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
626 put_href3();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
627 done="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
628 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
629 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
630
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
631 function put_href() {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
632 if ( p[i] == "" ) { return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
633 if ( which == FILENAME ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
634 printf("|<A HREF=\"#%s\">%s</A>|",p[i],p[i]);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
635 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
636 else {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
637 nz=split(which,zz,".");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
638 if ( zz[2] == "txt" || zz[1] == "tags" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
639 printf("|<A HREF=\"%s.html#%s\">%s</A>|",zz[1],p[i],p[i]);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
640 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
641 else {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
642 printf("|<A HREF=\"intro.html#%s\">%s</A>|",p[i],p[i]);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
643 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
644 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
645 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
646
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
647 function put_href2() {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
648 if ( atag == "" ) { return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
649 if ( which == FILENAME ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
650 printf("<A HREF=\"#%s\">%s</A>",atag,atag);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
651 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
652 else {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
653 nz=split(which,zz,".");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
654 if ( zz[2] == "txt" || zz[1] == "tags" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
655 printf("<A HREF=\"%s.html#%s\">%s</A>",zz[1],atag,atag);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
656 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
657 else {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
658 printf("<A HREF=\"intro.html#%s\">%s</A>",atag,atag);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
659 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
660 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
661 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
662
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
663 function put_href3() {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
664 if ( btag == "" ) { return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
665 if ( which == FILENAME ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
666 printf("<A HREF=\"#%s\">%s</A>",btag,btag2);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
667 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
668 else {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
669 nz=split(which,zz,".");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
670 if ( zz[2] == "txt" || zz[1] == "tags" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
671 printf("<A HREF=\"%s.html#%s\">%s</A>",zz[1],btag,btag2);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
672 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
673 else {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
674 printf("<A HREF=\"intro.html#%s\">%s</A>",btag,btag2);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
675 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
676 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
677 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
678
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
679 function put_this() {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
680 ntab=split(this,ta," ");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
681 for ( nta=1 ; nta <= ntab ; nta++ ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
682 ata=ta[nta];
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
683 lata=length(ata);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
684 aword="";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
685 for ( iata=1 ; iata <=lata ; iata++ ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
686 achar=substr(ata,iata,1);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
687 if ( achar != " " ) { aword=aword""achar; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
688 else {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
689 if ( aword != "" ) { atag=aword;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
690 see_tag();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
691 aword="";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
692 printf(" "); }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
693 else {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
694 printf(" ");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
695 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
696 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
697 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
698 if ( aword != "" ) { atag=aword;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
699 see_tag();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
700 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
701 if ( nta != ntab ) { printf(" "); }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
702 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
703 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
704
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
705 function if_already() {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
706 already="no";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
707 if ( npipe < 2 ) { return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
708 if ( atag == ":au" && p[2] == ":autocmd" ) { already="yes";return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
709 for ( npp=2 ; npp <= npipe ; npp=npp+2 ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
710 if ( ( (index(p[npp],atag)) != 0 \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
711 && length(p[npp]) > length(atag) \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
712 && length(atag) >= 1 \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
713 ) \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
714 || (p[npp] == atag) \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
715 ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
716 # printf("p=|%s|,tag=|%s| ",p[npp],atag);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
717 already="yes"; return; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
718 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
719 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
720
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
721 function see_opt() {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
722 done_opt="no";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
723 stag=atag;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
724 nfields = split(atag,tae,"=");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
725 if ( nfields > 1 ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
726 btag="'"tae[1]"'";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
727 btag2=tae[1];
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
728 find_tag3();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
729 if (done == "yes") {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
730 for ( ntae=2 ; ntae <= nfields ; ntae++ ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
731 printf("=%s",tae[ntae]);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
732 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
733 atag=stag;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
734 done_opt="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
735 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
736 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
737 btag=tae[1];
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
738 btag2=tae[1];
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
739 find_tag3();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
740 if ( done=="yes" ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
741 for ( ntae=2 ; ntae <= nfields ; ntae++ ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
742 printf("=%s",tae[ntae]);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
743 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
744 atag=stag;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
745 done_opt="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
746 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
747 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
748 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
749 nfields = split(atag,tae,"&quot;");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
750 if ( nfields > 1 ) {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
751 btag="'"tae[1]"'";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
752 btag2=tae[1];
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
753 find_tag3();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
754 if (done == "yes") {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
755 printf("&quot;");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
756 atag=stag;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
757 done_opt="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
758 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
759 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
760 btag=tae[1];
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
761 btag2=tae[1];
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
762 find_tag3();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
763 if (done == "yes") {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
764 printf("&quot;");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
765 atag=stag;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
766 done_opt="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
767 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
768 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
769 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
770 btag="'"tae[1]"'";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
771 btag2=tae[1];
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
772 find_tag3();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
773 if (done == "yes") {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
774 atag=stag;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
775 done_opt="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
776 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
777 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
778 btag=tae[1];
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
779 btag2=tae[1];
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
780 find_tag3();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
781 if (done == "yes") {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
782 atag=stag;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
783 done_opt="yes";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
784 return;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
785 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
786 atag=stag;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
787 }