home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.os2.apps
- Path: sparky!uunet!ukma!wupost!uwm.edu!linac!uchinews!ellis!roe2
- From: roe2@ellis.uchicago.edu (Cave Newt)
- Subject: Re: UNIX 'file' program for OS/2?
- Message-ID: <1992Nov6.203944.18137@midway.uchicago.edu>
- Sender: news@uchinews.uchicago.edu (News System)
- Reply-To: roe2@midway.uchicago.edu
- Organization: University of Chicago
- References: <1daie3INN79v@iskut.ucs.ubc.ca> <1992Nov5.193250.6913@midway.uchicago.edu> <1992Nov5.231649.14862@netcom.com>
- Date: Fri, 6 Nov 1992 20:39:44 GMT
- Lines: 31
-
- I wrote:
-
- >>Unfortunately, you really *must* dig out the OS/2 structure in the
- >>program itself, not via a magic file, since the "meat" is not at a
- >>fixed location (only a pointer to it is). OS/2 programs look like
- >>DOS programs if you don't make use of that pointer...
-
- xtifr@netcom.com (Chris Waters) writes:
-
- > Well, but the following entries in *my* /etc/magic seem to work ok:
- > 0 short 0x5A4D DOS executable
- > >0x18 short 0x40 -- OS/2 format
-
- OK, I made a slight misstatement: OS/2 programs look like *Windoze*
- programs (a small subset of DOS programs :-) ). In addition, this
- doesn't tell you whether it's NE format (1.x) or LE/LX/whatever format
- (2.x). I don't know about the original poster, but that's definitely
- something *I* want to know, so I'll stand by my claim.
-
- Finally, the entry would be improved if you used string variables--
- integers aren't the same on big- and little-endian systems, and many
- of us download stuff to Unix systems first. Thus:
-
- 0 string MZ MS-DOS executable
- >24 string @ (OS/2 or Windows format)
-
- Greg Roelofs
-
- P.S. I posted a bunch of compression-format magic entries to both
- alt.sources and comp.compression a few weeks ago. The original
- poster might be interested in those.
-