From owner-freebsd-bugs Wed Jul 7 15:10: 4 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 3437714E32 for ; Wed, 7 Jul 1999 15:10:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id PAA54581; Wed, 7 Jul 1999 15:10:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from soda.CSUA.Berkeley.EDU (soda.CSUA.Berkeley.EDU [128.32.43.52]) by hub.freebsd.org (Postfix) with ESMTP id 743F81544E for ; Wed, 7 Jul 1999 15:00:40 -0700 (PDT) (envelope-from dbushong@CSUA.Berkeley.EDU) Received: (from dbushong@localhost) by soda.CSUA.Berkeley.EDU (8.8.8/) id OAA14210 for FreeBSD-gnats-submit@freebsd.org; Wed, 7 Jul 1999 14:57:00 -0700 (PDT) env-from (dbushong) Message-Id: <199907072157.OAA14210@soda.CSUA.Berkeley.EDU> Date: Wed, 7 Jul 1999 14:57:00 -0700 (PDT) From: dbushong@CSUA.Berkeley.EDU (David Bushong) To: FreeBSD-gnats-submit@freebsd.org Subject: bin/12554: file(1) magic entry for WarCraft II PUD files Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 12554 >Category: bin >Synopsis: File to go in /usr/src/usr.bin/file/Magdir/warcraft2 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Jul 7 15:10:00 PDT 1999 >Closed-Date: >Last-Modified: >Originator: David Bushong >Release: FreeBSD 3.2-STABLE i386 >Organization: none >Environment: N.A. >Description: This is magic for WarCraft II (a DOS/Windows RTS game from Blizzard Entertainment) PUD (map) files. I came up with this while working on a clone for UN*X: http://www.csua.berkeley.edu/~xcraft/ The results look like this: timber-wolf ~/src/xcraft/server/puds [2:23pm] file crossover.pud crossover.pud: WarCraft II PUD, "Cross over", 128x128 timber-wolf ~/src/xcraft/server/puds [2:23pm] file nowhere.pud nowhere.pud: WarCraft II PUD, "Nowhere to run, nowhere to hide", 32x32 (the magic extracts the map size and title, and has a very unique match for the first few bytes, so there's no danger of collision) >How-To-Repeat: Here's the code. I'd suggest /usr/src/usr.bin/file/Magdir/warcraft2, but /usr/src/usr.bin/file/Magdir/pud would probably work equally well. #------------------------------------------------------------------------------ # warcraft2: file(1) magic for WarCraft II PUD (map) files # # From: David Bushong # 0 string TYPE\x10\0\0\0WAR2\ MAP WarCraft II PUD >Fix: N.A. Enjoy. >Release-Note: >Audit-Trail: >Unformatted: >0x2a string >\0 \b, "%s" >0x74 leshort x \b, %d >>0x76 leshort x \bx%d if that didn't make it through, here it is uuencoded: begin 644 warcraft2 M(RTM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+0HC('=A