[ xdvi-Bugs-1508963 ] [xdvi] xdvizilla doesn't work on Solaris
"SourceForge.net" <[email protected]>
| Newsgroups | gmane.comp.tex.xdvi.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1508963, was opened at 2006-06-20 01:09
Message generated for change (Comment added) made by stefanulrich
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=377580&aid=1508963&group_id=23164
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: X interface
Group: system-dependent
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Paul Vojta (vojta)
Assigned to: Nobody/Anonymous (nobody)
Summary: [xdvi] xdvizilla doesn't work on Solaris
Initial Comment:
On Solaris, the file command doesn't identify dvi
files, so xdvizilla terminates with an error message
instead of calling xdvi:
% file foobar.dvi
foobar.dvi: data
----------------------------------------------------------------------
>Comment By: Stefan Ulrich (stefanulrich)
Date: 2010-01-13 21:23
Message:
Closing ancient bug, has been fixed in xdvik's xdvizilla
----------------------------------------------------------------------
Comment By: Stefan Ulrich (stefanulrich)
Date: 2007-07-14 13:58
Message:
Logged In: YES
user_id=177175
Originator: NO
Adding tag [xdvi] since it has been fixed in xdvik's xdvizilla.
----------------------------------------------------------------------
Comment By: Stefan Ulrich (stefanulrich)
Date: 2006-07-07 22:49
Message:
Logged In: YES
user_id=177175
Great, that's even better; we don't need a shell function in
that case and can just use file -m on all platforms.
----------------------------------------------------------------------
Comment By: Paul Vojta (vojta)
Date: 2006-07-07 22:06
Message:
Logged In: YES
user_id=197485
Unfortunately, Solaris (Solaris 9 in my case) doesn't
recognize head -c. Here's an alternative:
echo '0<tab>string<tab>\367\002<tab>TeX DVI file' > tmpmagic
file -m tmpmagic thefile
--Paul
----------------------------------------------------------------------
Comment By: Stefan Ulrich (stefanulrich)
Date: 2006-07-07 19:49
Message:
Logged In: YES
user_id=177175
Could we maybe use an extra check for DVI files on Solaris?
E.g.:
get_filetype()
{
f="$1"
have_solaris=`uname -a | grep -i solaris` ### FIXME:
Check actual output on solaris ...
if [ "$have_solaris"xxx == "xxx" ]
then
ret=`file "$f"`
else
# Solaris' file command fails to identify DVI files (bug
#1508963),
# so here's an extra check for these:
magic=`head -c 2 "$f" | od -x | head -n 1 | awk '{print $2}'`
### FIXME: Can the above command be simplified? Is the
output of "od" endian-dependent?
if [ "$magic" == "02f7" ]
then
ret="TeX DVI file"
else
ret=`file "$f"`
fi
fi
echo "$ret"
}
and then instead of:
FILETYPE=`file "$FILE"`
use:
FILETYPE=`get_filetype "$FILE"`
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=377580&aid=1508963&group_id=23164
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev