1 --- asciiview 2001-04-25 17:59:22.000000000 +0200
2 +++ /usr/bin/asciiview 2010-03-07 18:58:25.000000000 +0100
6 # asciiview - an ascii art image browser script. Front end for aview/aaflip
13 - if anytopnm $1 >/tmp/aview$$.pgm 2>/dev/null ; then
14 + if anytopnm "$1" >/tmp/aview$$.pgm 2>/dev/null; then
16 - elif convert -colorspace gray $1 pgm:- 2>/dev/null ; then
17 + elif convert -colorspace gray "$1" pgm:- 2>/dev/null; then
20 echo "Failed to convert file format to PNM by both convert and anytopnm" >&2
28 if [ "$1" = "" ]; then
29 echo "$0 - an ascii art image/animation browser.
34 - filenames="$filenames $1"
35 + filenames[${#filenames[@]}]="$1"
41 +trap clear 0 2 3 9 15
42 mkfifo /tmp/aview$$.pgm
43 -outfile=/tmp/aview$$.pgm
44 -for name in $filenames ; do
45 -if test -r $name ; then
48 +while [ $i -lt ${#filenames[@]} ]; do
49 + name=${filenames[$i]}
50 + if [ -r "$name" ]; then
52 *.fli | *.lfc | *.flic )
54 - aaflip $options $name
55 + aaflip $options "$name"
58 - myconvert $name >/tmp/aview$$.pgm &
59 + myconvert "$name" > /tmp/aview$$.pgm &
62 aview $options /tmp/aview$$.pgm
66 echo "$name could not be opended"