diff -ruN man-1.6g.orig/src/makewhatis.sh man-1.6g/src/makewhatis.sh --- man-1.6g.orig/src/makewhatis.sh 2007-09-17 20:35:14.000000000 +0200 +++ man-1.6g/src/makewhatis.sh 2012-04-10 09:41:19.910191721 +0200 @@ -230,7 +230,7 @@ find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | $AWK ' function readline() { - if (use_zcat || use_bzcat || use_lzcat) { + if (use_zcat || use_bzcat || use_lzcat || use_xzcat) { result = (pipe_cmd | getline); if (result < 0) { print "Pipe error: " pipe_cmd " " ERRNO > "/dev/stderr"; @@ -245,7 +245,7 @@ } function closeline() { - if (use_zcat || use_bzcat || use_lzcat) { + if (use_zcat || use_bzcat || use_lzcat || use_xzcat) { return close(pipe_cmd); } else { return close(filename); @@ -260,8 +260,10 @@ print "adding " filename > "/dev/stderr" } - use_zcat = match(filename,"\\.Z$") || - match(filename,"\\.z$") || match(filename,"\\.gz$"); + use_xzcat = match(filename,"\\.xz"); + if (!use_xzcat) + use_zcat = match(filename,"\\.Z$") || + match(filename,"\\.z$") || match(filename,"\\.gz$"); if (!use_zcat) use_bzcat = match(filename,"\\.bz2"); if(!use_bzcat) @@ -279,8 +281,10 @@ actual_section = section; } sub(/\..*/, "", progname); - if (use_zcat || use_bzcat || use_lzcat) { - if (use_zcat) { + if (use_zcat || use_bzcat || use_lzcat || use_xzcat) { + if (use_xzcat) { + pipe_cmd = "xzcat \"" filename "\""; + } else if (use_zcat) { pipe_cmd = "zcat \"" filename "\""; } else if (use_bzcat) { pipe_cmd = "bzcat \"" filename "\"";