summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2010-03-03 11:34:57 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2010-03-03 11:34:57 +0000
commitbd731abde1a0daa3ef8b5c3be0eaee8500e66eff (patch)
treecbf357b674597db4d1a457e1460076a1eb57c32a /Master
parentf0349288c594eac639eb72d029fb6214a2553145 (diff)
texdoc 0.71 (bugfix)
git-svn-id: svn://tug.org/texlive/trunk@17300 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf/doc/man/man1/texdoc.12
-rw-r--r--Master/texmf/doc/man/man1/texdoc.man1.pdfbin5363 -> 5357 bytes
-rw-r--r--Master/texmf/doc/texdoc/News5
-rw-r--r--Master/texmf/scripts/texdoc/config.tlu4
-rw-r--r--Master/texmf/scripts/texdoc/constants.tlu2
-rw-r--r--Master/texmf/scripts/texdoc/functions.tlu11
-rw-r--r--Master/texmf/scripts/texdoc/score.tlu2
-rw-r--r--Master/texmf/scripts/texdoc/search.tlu13
-rw-r--r--Master/texmf/scripts/texdoc/view.tlu9
9 files changed, 28 insertions, 20 deletions
diff --git a/Master/texmf/doc/man/man1/texdoc.1 b/Master/texmf/doc/man/man1/texdoc.1
index 68f71c8e5ee..3d90d278d6d 100644
--- a/Master/texmf/doc/man/man1/texdoc.1
+++ b/Master/texmf/doc/man/man1/texdoc.1
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
-.TH TEXDOC "1" "February 2010" "texdoc 0.70" "User Commands"
+.TH TEXDOC "1" "March 2010" "texdoc 0.71" "User Commands"
.SH NAME
texdoc \- find & view documentation in TeX Live
.SH SYNOPSIS
diff --git a/Master/texmf/doc/man/man1/texdoc.man1.pdf b/Master/texmf/doc/man/man1/texdoc.man1.pdf
index a125fb01e6f..1b4565c8adf 100644
--- a/Master/texmf/doc/man/man1/texdoc.man1.pdf
+++ b/Master/texmf/doc/man/man1/texdoc.man1.pdf
Binary files differ
diff --git a/Master/texmf/doc/texdoc/News b/Master/texmf/doc/texdoc/News
index ad619ef593c..6dd1a4a5b35 100644
--- a/Master/texmf/doc/texdoc/News
+++ b/Master/texmf/doc/texdoc/News
@@ -1,3 +1,8 @@
+Version 0.71
+------------
+
+Fix file duplication bugs on windows, reported by Uwe Siart.
+
Version 0.70
------------
diff --git a/Master/texmf/scripts/texdoc/config.tlu b/Master/texmf/scripts/texdoc/config.tlu
index 7ae2b69a6bb..a03ca8f5cd5 100644
--- a/Master/texmf/scripts/texdoc/config.tlu
+++ b/Master/texmf/scripts/texdoc/config.tlu
@@ -9,7 +9,7 @@ See texdoc.tlu for details.
local L = {}
load_env(L, {
'os', 'kpse', 'lfs', 'io', 'setmetatable', 'print',
- 'win32_hook', 'confline_to_alias', 'confline_to_score', 'print_usage',
+ 'w32_path', 'confline_to_alias', 'confline_to_score', 'print_usage',
'config',
})
@@ -360,7 +360,7 @@ function show_config_files (print_fun, prefix)
local home = prefix
and (file.good and "(*) " or " ")
or ''
- print_fun (home..file.status..'\t'..win32_hook(file.path))
+ print_fun (home..file.status..'\t'..w32_path(file.path))
end
if prefix then
print("(*) This is the recommended configuration file "
diff --git a/Master/texmf/scripts/texdoc/constants.tlu b/Master/texmf/scripts/texdoc/constants.tlu
index ca286fc14e1..5d23081450e 100644
--- a/Master/texmf/scripts/texdoc/constants.tlu
+++ b/Master/texmf/scripts/texdoc/constants.tlu
@@ -15,7 +15,7 @@ load_env(L, {
-- progname and version
fullname = arg[0]
progname = 'texdoc'
-version = '0.70'
+version = '0.71'
-- make sure to update setup_config_from_cl() accordingly
-- and set a default value in setup_config_from_defaults() if relevant
diff --git a/Master/texmf/scripts/texdoc/functions.tlu b/Master/texmf/scripts/texdoc/functions.tlu
index 26b8d2d4d0a..4167b4563a9 100644
--- a/Master/texmf/scripts/texdoc/functions.tlu
+++ b/Master/texmf/scripts/texdoc/functions.tlu
@@ -13,13 +13,14 @@ load_env(L, {
})
-- change '/' to '\' on windows
+-- Use: internal representation of files always use forward slashes.
+-- This function should be called only before displaying a file name.
if os.type == "windows" then
- function win32_hook (path)
- local res = string.gsub (path, '/', '\\')
- return res -- get rid of gsub's 2nd return value
+ function w32_path (path)
+ return (string.gsub (path, '/', '\\'))
end
else
- function win32_hook (path)
+ function w32_path (path)
return path
end
end
@@ -125,7 +126,7 @@ end
export_symbols(L, {
'err_print',
'deb_print',
- 'win32_hook',
+ 'w32_path',
'parse_zip',
'print_usage',
'path_parent',
diff --git a/Master/texmf/scripts/texdoc/score.tlu b/Master/texmf/scripts/texdoc/score.tlu
index f275925d184..0a566610903 100644
--- a/Master/texmf/scripts/texdoc/score.tlu
+++ b/Master/texmf/scripts/texdoc/score.tlu
@@ -83,7 +83,7 @@ function set_score(df, original_kw)
if score == -10 and df.runtodoc then score = -6 end
-- bonus for metadata
if df.details and
- not string.find(string.lower(df.details), '^readme') then
+ not string.find(string.lower(df.details), 'readme') then
score = score + 3
end
-- adjust from keyword-specific tables
diff --git a/Master/texmf/scripts/texdoc/search.tlu b/Master/texmf/scripts/texdoc/search.tlu
index e336d01ed12..aa225b7fb46 100644
--- a/Master/texmf/scripts/texdoc/search.tlu
+++ b/Master/texmf/scripts/texdoc/search.tlu
@@ -10,7 +10,7 @@ local L = {}
load_env(L, {
'os', 'lfs', 'kpse', 'io', 'setmetatable', 'print',
'dofile', 'loadfile', 'setfenv', 'rawget', 'rawset',
- 'win32_hook', 'parse_zip', 'path_parent',
+ 'parse_zip', 'path_parent',
'get_patterns', 'sort_doclist', 'docfile_quality', 'ext_pos',
'config',
})
@@ -31,7 +31,8 @@ doclist = {
}
The inv subtable is such that for all i
-doclist.inv(doclist[i].realpath) == i
+doclist.inv(doclist[i].realpath:lower()) == i
+Paths are lowercased in order to avoid duplicates on windows.
--]]
local Doclist = {}
@@ -47,13 +48,13 @@ end
-- add a docfile to a list
function Doclist:add(df)
if not df.realpath then return end -- useful if vanilla == false
- local index = self.inv[df.realpath]
+ local index = self.inv[df.realpath:lower()]
if index then
self[index]:mergein(df)
else
local newindex = #self + 1
self[newindex] = df
- self.inv[df.realpath] = newindex
+ self.inv[df.realpath:lower()] = newindex
end
end
@@ -241,7 +242,7 @@ end
-- return the real path from a texdocs tree number + relative path
function texdocs_tree_to_path(tree, rel)
- return win32_hook(doc_roots[tree].path..'/'..rel)
+ return doc_roots[tree].path..'/'..rel
end
-- find docfiles in texdocs directories
@@ -384,7 +385,7 @@ function get_doclist_sty(patlist)
local file = kpse.find_file(pat.name)
if file then
local df = Docfile:new({
- name = win32_hook(file),
+ name = file,
tree = -1,
pattern = pat,
})
diff --git a/Master/texmf/scripts/texdoc/view.tlu b/Master/texmf/scripts/texdoc/view.tlu
index c34b96b8103..9d924992b11 100644
--- a/Master/texmf/scripts/texdoc/view.tlu
+++ b/Master/texmf/scripts/texdoc/view.tlu
@@ -9,7 +9,7 @@ See texdoc.tlu for details.
local L = {}
load_env(L, {
'os', 'io', 'print',
- 'config', 'parse_zip',
+ 'config', 'parse_zip', 'w32_path',
})
----------------------------- view a document ------------------------------
@@ -59,7 +59,7 @@ function view_file (filename)
..config.rm_dir..' '..tmpdir
filename = nozipname
else
- viewer_replacement = '"'..filename..'"'
+ viewer_replacement = '"'..w32_path(filename)..'"'
end
-- files without extension are assumed to be text
local viewext = string.match(filename,'.*%.([^/]*)$') or 'txt'
@@ -130,9 +130,10 @@ function print_menu(name, doclist, showall)
if doc.quality == 'killed' then break end
if doc.quality ~= 'good' and not showall then break end
if config.machine_switch == true then
- print(name, doc.score, doc.realpath, doc.lang or '', doc.details or '')
+ print(name, doc.score, w32_path(doc.realpath),
+ doc.lang or '', doc.details or '')
else
- print(string.format('%2d %s', i, doc.realpath))
+ print(string.format('%2d %s', i, w32_path(doc.realpath)))
if doc.details or doc.lang then
local line = ' = '
if doc.lang then line = line..'['..doc.lang..'] ' end