annotate runtime/doc/maketags.awk @ 17261:432714f5c0f7

Update runtime files commit https://github.com/vim/vim/commit/790c18bfa5dfeca51749b752dddc41e60cb3fa54 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jul 4 17:22:06 2019 +0200 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Thu, 04 Jul 2019 17:30:05 +0200
parents 3fc0f57ecb91
children aa539262b6a7
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 { FS=" "; }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 NR == 1 { nf=split(FILENAME,f,".")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 print "<HTML>";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 print "<HEAD><TITLE>" f[1] "</TITLE></HEAD>";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 print "<BODY BGCOLOR=\"#ffffff\">";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 print "<H1>Vim Documentation: " f[1] "</H1>";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 print "<A NAME=\"top\"></A>";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 print "<HR>";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 print "<PRE>";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 # protect special chars
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 gsub(/&/,"\\&amp;");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 gsub(/>/,"\\&gt;");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 gsub(/</,"\\&lt;");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 gsub(/"/,"\\&quot;");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 gsub(/%/,"\\&#37;");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 nf=split($0,tag," ");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 tagkey[t]=tag[1];tagref[t]=tag[2];tagnum[t]=NR;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 print $1 " " $2 " line " NR >"tags.ref"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 n=split($2,w,".");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 printf ("|<A HREF=\"%s.html#%s\">%s</A>| %s\n",w[1],$1,$1,$2);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 END {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 topback();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 print "</PRE>\n</BODY>\n\n\n</HTML>";
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 }
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 # as main we keep index.txt (by default)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 # other candidate, help.txt
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 function topback () {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 printf("<A HREF=\"#top\">top</A> - ");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 printf("<A HREF=\"help.html\">back to help</A>\n");
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 }