Set locale to C.

Add support for bzip2.
Remove redirection of stderr to /dev/null.
This commit is contained in:
Pavel Roskin 2002-12-12 08:34:24 +00:00
parent b594ab56c4
commit b1c7fda53b

View File

@ -3,16 +3,16 @@
# Based on previous version of lslR # Based on previous version of lslR
# Modified by Tomas Novak <tnovak@ipex.cz> April 2000 # Modified by Tomas Novak <tnovak@ipex.cz> April 2000
# (to allow spaces in filenames) # (to allow spaces in filenames)
#
ZCAT="gunzip -c" # It's assumed that lslR was generated in C locale.
CAT="cat"
mclslRfs_list () { mclslRfs_list () {
case "$1" in case "$1" in
*.gz) MYCAT="$ZCAT";; *.bz2) MYCAT="bzip2 -dc";;
*.z) MYCAT="$ZCAT";; *.gz) MYCAT="gzip -dc";;
*.Z) MYCAT="$ZCAT";; *.z) MYCAT="gzip -dc";;
*) MYCAT="$CAT";; *.Z) MYCAT="gzip -dc";;
*) MYCAT="cat";;
esac esac
$MYCAT "$1" | @AWK@ ' $MYCAT "$1" | @AWK@ '
@ -38,9 +38,11 @@ BEGIN {
# Cannot assign to $9, or spaces in the filename would be reduced. # Cannot assign to $9, or spaces in the filename would be reduced.
attr=substr($0, 1, length($0)-length(name)) attr=substr($0, 1, length($0)-length(name))
printf "%s%s%s\n", attr, dir, name printf "%s%s%s\n", attr, dir, name
}' 2>/dev/null }'
} }
export LC_ALL="C"
case "$1" in case "$1" in
list) mclslRfs_list "$2"; exit 0;; list) mclslRfs_list "$2"; exit 0;;
esac esac