diff options
Diffstat (limited to 'media-gfx/aview/files')
-rw-r--r-- | media-gfx/aview/files/aview-1.3.0_rc1-filename-spaces.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/media-gfx/aview/files/aview-1.3.0_rc1-filename-spaces.patch b/media-gfx/aview/files/aview-1.3.0_rc1-filename-spaces.patch new file mode 100644 index 000000000000..e42ed0d5c583 --- /dev/null +++ b/media-gfx/aview/files/aview-1.3.0_rc1-filename-spaces.patch @@ -0,0 +1,53 @@ +diff -ur aview-1.3.0-orig/asciiview aview-1.3.0/asciiview +--- aview-1.3.0-orig/asciiview 2005-08-15 21:20:16.000000000 -0400 ++++ aview-1.3.0/asciiview 2005-08-15 21:20:19.000000000 -0400 +@@ -7,9 +7,9 @@ + } + myconvert() + { +- if anytopnm $1 >/tmp/aview$$.pgm 2>/dev/null ; then ++ if anytopnm "$1" >/tmp/aview$$.pgm 2>/dev/null ; then + exit +- elif convert -colorspace gray $1 pgm:- 2>/dev/null ; then ++ elif convert -colorspace gray "$1" pgm:- 2>/dev/null ; then + exit + fi + echo "Failed to convert file format to PNM by both convert and anytopnm" >&2 +@@ -44,8 +44,13 @@ + options="$options $1" + shift + ;; +- *) +- filenames="$filenames $1" ++ *) ++ if [ "$filenames" = "" ] ++ then ++ filenames=$1 #avoid leading null ++ else ++ filenames=$(echo -e "$filenames\000$1") ++ fi + shift + ;; + esac +@@ -53,15 +58,16 @@ + trap clear 0 + mkfifo /tmp/aview$$.pgm + outfile=/tmp/aview$$.pgm +-for name in $filenames ; do +-if test -r $name ; then +-case $name in ++IFS=$(echo -e "\000") ++echo $filenames | while read name; do ++if test -r "$name" ; then ++case "$name" in + *.fli | *.lfc | *.flic ) + PATH="$PATH:." +- aaflip $options $name ++ aaflip $options "$name" + ;; + *) +- myconvert $name >/tmp/aview$$.pgm & ++ myconvert "$name" >/tmp/aview$$.pgm & + pid=$! + PATH="$PATH:." + aview $options /tmp/aview$$.pgm |