Article View: comp.text.tex
Article #11195append-magic 1.6 Was: Re: Can I add an enty to /etc/magic to make file(1) understand DVI?
From: Ignatios Souvatzis
Date: Sun, 06 Oct 1991 12:03
Date: Sun, 06 Oct 1991 12:03
205 lines
9575 bytes
9575 bytes
Ok, I got some replies about single and double \\'s in the -dumb
file... (thanks to Gerben Wierda <wierda@ltb.bso.nl> and Ken Yap
<ken@syd.dit.csiro.au> for testing...
Version 1.6 has 4 files, (append-magic{,-dumb,-verydumb,-ultrix}). If
you used -dumb earlier, you should switch to -verydumb. GB and KY
should try -dumb.
#!/bin/sh
# to extract, remove the header and type "sh filename"
if `test ! -s ./append-magic`
then
echo "writing ./append-magic"
cat > ./append-magic << '\End\Of\Shar\'
##########################################################################
# TeX support for the file command, to be appended to /usr/lib/file/magic,
# /etc/magic or whatever applies on your system.
# Version 1.6n (26 Sep 1991)
# Copyright 1991 Ignatios Souvatzis (souva@babsy.mpifr-bonn.mpg.de)
# All rights reserved. You may use this file or give it away under
# the conditions of the GNU General Public License, Version 1 or
# later, available from the Free Software Foundation, 675 Mass Ave,
# Campridge, MA 02139, USA. In short, you are allowed to use, alter,
# copy and distribute this file as long as you don't make any profit
# out of it (except for reasonable copying fees), mention that YOU
# made the changes (if you made any) and don't remove this notice from
# it. There is NO WARRANTY --- it will work for you or not, it will
# damage your computer or your health or not.
#########################################################################
#
# TeX:
#
0 string \\documentstyle\\%[^}]*}\\% LaTeX document %s
# TeX82 binary format:
0 byte 0xF7 TeX82
>1 byte 0x02 device independent (.dvi) file
>1 byte 0x03 right-left device independent (.dvi) file
>1 byte 0x04 : Impossible! (.dvi file from the future)
>1 byte 0x83 general font (.gf) file
>1 byte 0x59 packed font (.pk) file
>1 byte 0xCA virtual font (.vf) file
#
# Old pxl format (non conforming to .dvi general format):
# for right endians:
0 long 0x000003E9 old pixel font (.pxl) file
# for wrong endians:
0 long 0xE9030000 old pixel font (.pxl) file
# Thou shalt not ask me for a .tfm entry.
# Thou shalt read vftovp.web if thou desirest to know, why.
\End\Of\Shar\
else
echo "will not over write ./append-magic"
fi
if [ `wc -c ./append-magic | awk '{printf $1}'` -ne 1628 ]
then
echo `wc -c ./append-magic | awk '{print "Got " $1 ", Expected " 1628}'`
fi
if `test ! -s ./append-magic-dumb`
then
echo "writing ./append-magic-dumb"
cat > ./append-magic-dumb << '\End\Of\Shar\'
##########################################################################
# TeX support for the file command, to be appended to /usr/lib/file/magic,
# /etc/magic or whatever applies on your system.
# Version 1.6d (26 Sep 1991)
# Copyright 1991 Ignatios Souvatzis (souva@babsy.mpifr-bonn.mpg.de)
# All rights reserved. You may use this file or give it away under
# the conditions of the GNU General Public License, Version 1 or
# later, available from the Free Software Foundation, 675 Mass Ave,
# Campridge, MA 02139, USA. In short, you are allowed to use, alter,
# copy and distribute this file as long as you don't make any profit
# out of it (except for reasonable copying fees), mention that YOU
# made the changes (if you made any) and don't remove this notice from
# it. There is NO WARRANTY --- it will work for you or not, it will
# damage your computer or your health or not.
#########################################################################
#
# TeX:
#
0 string \\documentstyle LaTeX document
# TeX82 binary format:
0 byte 0xF7 TeX82
>1 byte 0x02 device independent (.dvi) file
>1 byte 0x03 right-left device independent (.dvi) file
>1 byte 0x04 : Impossible! (.dvi file from the future)
>1 byte 0x83 general font (.gf) file
>1 byte 0x59 packed font (.pk) file
>1 byte 0xCA virtual font (.vf) file
#
# Old pxl format (non conforming to .dvi general format):
# for right endians:
0 long 0x000003E9 old pixel font (.pxl) file
# for wrong endians:
0 long 0xE9030000 old pixel font (.pxl) file
# Thou shalt not ask me for a .tfm entry.
# Thou shalt read vftovp.web if thou desirest to know, why.
\End\Of\Shar\
else
echo "will not over write ./append-magic-dumb"
fi
if [ `wc -c ./append-magic-dumb | awk '{printf $1}'` -ne 1613 ]
then
echo `wc -c ./append-magic-dumb | awk '{print "Got " $1 ", Expected " 1613}'`
fi
if `test ! -s ./append-magic-verydumb`
then
echo "writing ./append-magic-verydumb"
cat > ./append-magic-verydumb << '\End\Of\Shar\'
##########################################################################
# TeX support for the file command, to be appended to /usr/lib/file/magic,
# /etc/magic or whatever applies on your system.
# Version 1.6vd (26 Sep 1991)
# Copyright 1991 Ignatios Souvatzis (souva@babsy.mpifr-bonn.mpg.de)
# All rights reserved. You may use this file or give it away under
# the conditions of the GNU General Public License, Version 1 or
# later, available from the Free Software Foundation, 675 Mass Ave,
# Campridge, MA 02139, USA. In short, you are allowed to use, alter,
# copy and distribute this file as long as you don't make any profit
# out of it (except for reasonable copying fees), mention that YOU
# made the changes (if you made any) and don't remove this notice from
# it. There is NO WARRANTY --- it will work for you or not, it will
# damage your computer or your health or not.
#########################################################################
#
# TeX:
#
0 string \documentstyle LaTeX document
# TeX82 binary format:
0 byte 0xF7 TeX82
>1 byte 0x02 device independent (.dvi) file
>1 byte 0x03 right-left device independent (.dvi) file
>1 byte 0x04 : Impossible! (.dvi file from the future)
>1 byte 0x83 general font (.gf) file
>1 byte 0x59 packed font (.pk) file
>1 byte 0xCA virtual font (.vf) file
#
# Old pxl format (non conforming to .dvi general format):
# for right endians:
0 long 0x000003E9 old pixel font (.pxl) file
# for wrong endians:
0 long 0xE9030000 old pixel font (.pxl) file
# Thou shalt not ask me for a .tfm entry.
# Thou shalt read vftovp.web if thou desirest to know, why.
\End\Of\Shar\
else
echo "will not over write ./append-magic-verydumb"
fi
if [ `wc -c ./append-magic-verydumb | awk '{printf $1}'` -ne 1613 ]
then
echo `wc -c ./append-magic-verydumb | awk '{print "Got " $1 ", Expected " 1613}'`
fi
if `test ! -s ./append-magic-ultrix`
then
echo "writing ./append-magic-ultrix"
cat > ./append-magic-ultrix << '\End\Of\Shar\'
##########################################################################
# TeX support for the file command, to be appended to /usr/lib/file/magic,
# /etc/magic or whatever applies on your system.
# Version 1.6u (26 Sep 1991)
# Copyright 1991 Ignatios Souvatzis (souva@babsy.mpifr-bonn.mpg.de)
# All rights reserved. You may use this file or give it away under
# the conditions of the GNU General Public License, Version 1 or
# later, available from the Free Software Foundation, 675 Mass Ave,
# Campridge, MA 02139, USA. In short, you are allowed to use, alter,
# copy and distribute this file as long as you don't make any profit
# out of it (except for reasonable copying fees), mention that YOU
# made the changes (if you made any) and don't remove this notice from
# it. There is NO WARRANTY --- it will work for you or not, it will
# damage your computer or your health or not.
#########################################################################
#
# TeX:
#
0 string \\documentstyle\\%[^}]*}\\% 1,5 LaTeX document %s
# TeX82 binary format:
0 byte 0xF7 1,5 TeX82
>1 byte 0x02 1,5 device independent (.dvi) file
>1 byte 0x03 1,5 right-left device independent (.dvi) file
>1 byte 0x04 1,5 : Impossible! (.dvi file from the future)
>1 byte 0x83 1,5 general font (.gf) file
>1 byte 0x59 1,5 packed font (.pk) file
>1 byte 0xCA 1,5 virtual font (.vf) file
#
# Old pxl format (non conforming to .dvi general format):
# for right endians:
0 long 0x000003E9 1,5 old pixel font (.pxl) file
# for wrong endians:
0 long 0xE9030000 1,5 old pixel font (.pxl) file
# Thou shalt not ask me for a .tfm entry.
# Thou shalt read vftovp.web if thou desirest to know, why.
\End\Of\Shar\
else
echo "will not over write ./append-magic-ultrix"
fi
if [ `wc -c ./append-magic-ultrix | awk '{printf $1}'` -ne 1668 ]
then
echo `wc -c ./append-magic-ultrix | awk '{print "Got " $1 ", Expected " 1668}'`
fi
echo "Finished archive 1 of 1"
exit
--
Paper mail: Ignatios Souvatzis, Radioastronomisches Institut der
Universitaet Bonn, Auf dem Huegel 71, D-5300 Bonn 1, FRG
Internet: u502sou@mpirbn.mpifr-bonn.mpg.de
souva@babsy.mpifr-bonn.mpg.de
Technical Details
Message-ID:
<U502SOU.91Oct6130325@mpirbn.mpifr-bonn.mpg.de>Path:
arc1-ca.pugleaf.net!wupost!uunet!mcsun!unido!mpirbn!u502souReferences:
<949@ltb.ltb.bso.nl> <17637@chopin.udel.edu> <1037@ltb.ltb.bso.nl>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!wupost!uunet!mcsun!unido!mpirbn!u502sou From: u502sou@mpirbn.mpifr-bonn.mpg.de (Ignatios Souvatzis) Newsgroups: comp.text.tex,alt.sources,sub.tex Subject: append-magic 1.6 Was: Re: Can I add an enty to /etc/magic to make file(1) understand DVI? Message-ID: <U502SOU.91Oct6130325@mpirbn.mpifr-bonn.mpg.de> Date: 6 Oct 91 12:03:25 GMT References: <949@ltb.ltb.bso.nl> <17637@chopin.udel.edu> <1037@ltb.ltb.bso.nl> Sender: u502sou@mpirbn.mpifr-bonn.mpg.de Reply-To: u502sou@c1a Distribution: world,alt,sub Organization: /mnt0/u502sou/.organization Lines: 205 Supersedes: <U502SOU.91Sep26094327@mpirbn.mpifr-bonn.mpg.de> <U502SOU.91Sep30052806@mpirbn.mpifr-bonn.mpg.de> In-reply-to: u502sou@mpirbn.mpifr-bonn.mpg.de's message of 30 Sep 91 04:28:06 GMT X-Md4-Signature: 31d4a6957f91f6d3584f9ce50fb5c140