[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#117528: xdvi no longer understands quotes in options



On Tue, Dec 11, 2001 at 12:09:58PM +0100, Meik Hellmund wrote:
> Julian Gilbey <J.D.Gilbey@qmw.ac.uk> writes:
> > 
> > I suggest the following hack using IFS to work around it.  It will
> > fail if any argument has a newline character in it, but that shouldn't
> > be much of a loss ;-)  Otherwise, one could replace the newline with
> > something else and use printf or equivalent.
> > 
> > for i
> > do
> >     args="$args
> > $lastarg"
> >     lastarg=$i
> > done
> > filename=$lastarg
> > 
> > [...]
> > 
> > args="$NAMEOPT
> > $args
> > $filename"
> > 
> > OIFS=IFS
> > IFS='
> > '
> > xdvi.bin $args || exit 1
> > exit 0
> 
> This doesn't work for me. Perhaps it is incomplete (OIFS is never used),
> but I couldn't complete it. I do not understand how the value of IFS
> influences the handling of quoting. 

Two fixes to what I suggested:

(1) (Aesthetic) Get rid of the OIFS line; it's never used
(2) (Bugfix) Near the start of xdvi, there's a line which reads:

    NAMEOPT='-name xdvi';;

    This must be changed to read:

    NAMEOPT='-name
xdvi';;

    as otherwise, xdvi.bin sees the single argument "-name xdvi",
    which it doesn't understand.

   Julian

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

     Julian Gilbey, Dept of Maths,             Debian GNU/Linux Developer
      Queen Mary, Univ. of London         see http://people.debian.org/~jdg/
   http://www.maths.qmul.ac.uk/~jdg/           or http://www.debian.org/
        Visit http://www.thehungersite.com/ to help feed the hungry
                 Also: http://www.helpthehungry.org/



Reply to: