1b6cee71dSXin LI 2b6cee71dSXin LI#------------------------------------------------------------------------------ 3*43a5ec4eSXin LI# $File: os2,v 1.13 2021/04/26 15:56:00 christos Exp $ 4b6cee71dSXin LI# os2: file(1) magic for OS/2 files 5b6cee71dSXin LI# 6b6cee71dSXin LI 7b6cee71dSXin LI# Provided 1998/08/22 by 8b6cee71dSXin LI# David Mediavilla <davidme.news@REMOVEIFNOTSPAMusa.net> 920f8619dSXin LI1 search/100 InternetShortcut MS Windows 95 Internet shortcut text 105f0216bdSXin LI>17 search/100 URL= (URL=< 115f0216bdSXin LI>>&0 string x \b%s>) 12b6cee71dSXin LI 13b6cee71dSXin LI# OS/2 URL objects 14b6cee71dSXin LI# Provided 1998/08/22 by 15b6cee71dSXin LI# David Mediavilla <davidme.news@REMOVEIFNOTSPAMusa.net> 16b6cee71dSXin LI#0 string http: OS/2 URL object text 17b6cee71dSXin LI#>5 string >\ (WWW) <http:%s> 18b6cee71dSXin LI#0 string mailto: OS/2 URL object text 19b6cee71dSXin LI#>7 string >\ (email) <%s> 20b6cee71dSXin LI#0 string news: OS/2 URL object text 21b6cee71dSXin LI#>5 string >\ (Usenet) <%s> 22b6cee71dSXin LI#0 string ftp: OS/2 URL object text 23b6cee71dSXin LI#>4 string >\ (FTP) <ftp:%s> 24b6cee71dSXin LI#0 string file: OS/2 URL object text 25b6cee71dSXin LI#>5 string >\ (Local file) <%s> 26b6cee71dSXin LI 27b6cee71dSXin LI# >>>>> OS/2 INF/HLP <<<<< (source: Daniel Dissett ddissett@netcom.com) 28*43a5ec4eSXin LI# URL: http://fileformats.archiveteam.org/wiki/INF/HLP_(OS/2) 29*43a5ec4eSXin LI# Reference: http://www.edm2.com/0308/inf.html 30b6cee71dSXin LI# Carl Hauser (chauser.parc@xerox.com) and 31b6cee71dSXin LI# Marcus Groeber (marcusg@ph-cip.uni-koeln.de) 32b6cee71dSXin LI# list the following header format in inf02a.doc: 33b6cee71dSXin LI# 34b6cee71dSXin LI# int16 ID; // ID magic word (5348h = "HS") 35b6cee71dSXin LI# int8 unknown1; // unknown purpose, could be third letter of ID 36b6cee71dSXin LI# int8 flags; // probably a flag word... 37b6cee71dSXin LI# // bit 0: set if INF style file 38b6cee71dSXin LI# // bit 4: set if HLP style file 39b6cee71dSXin LI# // patching this byte allows reading HLP files 40b6cee71dSXin LI# // using the VIEW command, while help files 41b6cee71dSXin LI# // seem to work with INF settings here as well. 42b6cee71dSXin LI# int16 hdrsize; // total size of header 43b6cee71dSXin LI# int16 unknown2; // unknown purpose 44b6cee71dSXin LI# 45b6cee71dSXin LI0 string HSP\x01\x9b\x00 OS/2 INF 46*43a5ec4eSXin LI!:mime application/x-os2-inf 47*43a5ec4eSXin LI!:ext inf 48b6cee71dSXin LI>107 string >0 (%s) 49b6cee71dSXin LI0 string HSP\x10\x9b\x00 OS/2 HLP 50*43a5ec4eSXin LI!:mime application/x-os2-hlp 51*43a5ec4eSXin LI!:ext hlp 52b6cee71dSXin LI>107 string >0 (%s) 53b6cee71dSXin LI 54*43a5ec4eSXin LI# From: Joerg Jenderek 55*43a5ec4eSXin LI# URL: http://fileformats.archiveteam.org/wiki/MSG_(OS/2) 56*43a5ec4eSXin LI# Reference: https://github.com/OS2World/UTIL-SYSTEM-MKMSGF/blob/master/mkmsgf.h 57*43a5ec4eSXin LI# Note: created by MKMSGF.EXE. Text source can be recreated by E_MSGF 58*43a5ec4eSXin LI# example like OS001H.MSG 59*43a5ec4eSXin LI0 string \xffMKMSGF\0 OS/2 help message 60*43a5ec4eSXin LI!:mime application/x-os2-msg 61*43a5ec4eSXin LI!:ext msg 62*43a5ec4eSXin LI# identifier[3] like: DOS NET REX SYS ... 63*43a5ec4eSXin LI>8 string x '%.3s' 64*43a5ec4eSXin LI# msgnumber: number of messages 65*43a5ec4eSXin LI>11 uleshort x \b, %u messages 66*43a5ec4eSXin LI# firstmsgnumber; number of the first message like: some times 0 often 1 169 1000 3502 67*43a5ec4eSXin LI>13 uleshort >1 \b, 1st number %u 68*43a5ec4eSXin LI# offset16bit; 1~Index table has 16-bit offsets (files<64k) 0~Index table has 32-bit offsets 69*43a5ec4eSXin LI>15 ubyte =0 \b, 32-bit 70*43a5ec4eSXin LI#>15 ubyte =1 \b, 16-bit 71*43a5ec4eSXin LI# version; file version: 2~new 0~old 72*43a5ec4eSXin LI>16 uleshort !2 \b, version %u 73*43a5ec4eSXin LI# indextaboffset; offset of index table: 1F~after header 0~no index table for version 0? 74*43a5ec4eSXin LI>18 uleshort >0 75*43a5ec4eSXin LI>>18 uleshort !0x1f \b, at %#x index 76*43a5ec4eSXin LI# 32-bit offset 77*43a5ec4eSXin LI>>15 ubyte =0 78*43a5ec4eSXin LI# offset with message table 79*43a5ec4eSXin LI>>>(18.s) ulelong x \b, at %#x 80*43a5ec4eSXin LI# 1st message 81*43a5ec4eSXin LI# http://www.os2museum.com/files/docs/os210ptk/os2-1.0-ptk-tools-1988.pdf 82*43a5ec4eSXin LI# message type: E~Error H~Help I~Information P~Prompt W~Warning ? 83*43a5ec4eSXin LI>>>>(&-4.l) ubyte x %c-type 84*43a5ec4eSXin LI>>>>>&0 string x %s 85*43a5ec4eSXin LI# 16-bit offset 86*43a5ec4eSXin LI>>15 ubyte =1 87*43a5ec4eSXin LI# msgnum; message number 88*43a5ec4eSXin LI>>>(18.s) uleshort x \b, number %u 89*43a5ec4eSXin LI# msgindex; offset of message from begin of file 90*43a5ec4eSXin LI>>>(18.s+2) uleshort x at %#x 91*43a5ec4eSXin LI# message type E H I P W ? 92*43a5ec4eSXin LI>>>>(&-2.s) ubyte x %c-type 93*43a5ec4eSXin LI# skip newline carriage return 94*43a5ec4eSXin LI>>>>>&0 ubeshort =0x0D0a 95*43a5ec4eSXin LI>>>>>>&0 string x %s 96*43a5ec4eSXin LI>>>>>&0 ubeshort !0x0D0a 97*43a5ec4eSXin LI>>>>>>&-2 string x %s 98*43a5ec4eSXin LI# for version 0 index table apparently at offset 1F 99*43a5ec4eSXin LI>16 uleshort 0 100*43a5ec4eSXin LI>>15 ubyte 1 101*43a5ec4eSXin LI# 1st message 16-bit 102*43a5ec4eSXin LI>>>0x1F uleshort x \b, at %#x 103*43a5ec4eSXin LI# message type: E~Error H~Help I~Information P~Prompt W~Warning ? 104*43a5ec4eSXin LI>>>>(0x1F.s) ubyte x %c-type 105*43a5ec4eSXin LI>>>>>&0 string x %s 106*43a5ec4eSXin LI# 2nd message 16-bit 107*43a5ec4eSXin LI>>>0x21 uleshort x \b, at %#x 108*43a5ec4eSXin LI>>>>(0x21.s) ubyte x %c-type 109*43a5ec4eSXin LI>>>>>&0 string x %s 110*43a5ec4eSXin LI# 3rd message 16-bit 111*43a5ec4eSXin LI>>>0x23 uleshort x \b, at %#x 112*43a5ec4eSXin LI>>>>(0x23.s) ubyte x %c-type 113*43a5ec4eSXin LI>>>>>&0 string x %s 114*43a5ec4eSXin LI# version 0 32-bit 115*43a5ec4eSXin LI>>15 ubyte 0 116*43a5ec4eSXin LI# 1st message 32-bit 117*43a5ec4eSXin LI>>>0x1f ulelong x \b, at %#x 118*43a5ec4eSXin LI>>>>(0x1F.l) ubyte x %c-type 119*43a5ec4eSXin LI>>>>>&0 string x %s 120*43a5ec4eSXin LI# 2nd message 32-bit 121*43a5ec4eSXin LI>>>0x23 ulelong x \b, at %#x 122*43a5ec4eSXin LI>>>>(0x23.l) ubyte x %c-type 123*43a5ec4eSXin LI>>>>>&0 string x %s 124*43a5ec4eSXin LI# 3rd message 32-bit 125*43a5ec4eSXin LI>>>0x27 ulelong x \b, AT %#x 126*43a5ec4eSXin LI>>>>(0x27.l) ubyte x %c-type 127*43a5ec4eSXin LI>>>>>&0 string x %s 128*43a5ec4eSXin LI# countryinfo; offset of country info block: 0 for version 0 129*43a5ec4eSXin LI>20 uleshort !0 \b, at %#x countryinfo 130*43a5ec4eSXin LI# nextcoutryinfo 131*43a5ec4eSXin LI>>22 uleshort >0 \b, at %#x next 132*43a5ec4eSXin LI# reserved[5]; Must be 0 133*43a5ec4eSXin LI>>25 ulelong !0 \b, RESERVED %#x 134*43a5ec4eSXin LI>>(20.s) use os2-msg-info 135*43a5ec4eSXin LI# display country info block of MKMSGF message file 136*43a5ec4eSXin LI0 name os2-msg-info 137*43a5ec4eSXin LI# bytesperchar; bytes per char: 1~SBCS 2~DBCS 138*43a5ec4eSXin LI>0 ubyte >1 \b, %u bytes/char 139*43a5ec4eSXin LI# reserved; Not known 140*43a5ec4eSXin LI>1 uleshort !0 \b, reserved %#x 141*43a5ec4eSXin LI# langfamilyID; language family ID like: 0~? 1~Arabic ... 7~German ... 9~English ... 34~Slovene 142*43a5ec4eSXin LI>3 uleshort >0 \b, language %u 143*43a5ec4eSXin LI# langversionID; like: 7_1~German 7_2~Swiss German 12_1~French 12_3~Canadian French 144*43a5ec4eSXin LI>>5 uleshort x \b_%u 145*43a5ec4eSXin LI# langfamilyID too high. This should not happen 146*43a5ec4eSXin LI>3 uleshort >34 (invalid language) 147*43a5ec4eSXin LI# codepagesnumber; number of codepages like: 1 2 ... 16 148*43a5ec4eSXin LI>7 uleshort x \b, %u code page 149*43a5ec4eSXin LI# plural s 150*43a5ec4eSXin LI>7 uleshort >1 \bs 151*43a5ec4eSXin LI# too many number of codepages. This should not happen 152*43a5ec4eSXin LI>7 uleshort >16 (Too many) 153*43a5ec4eSXin LI# codepages[16]; codepages list like 437 850 ... 154*43a5ec4eSXin LI>7 uleshort <17 155*43a5ec4eSXin LI# 1st code page 156*43a5ec4eSXin LI>>9 uleshort >0 %u 157*43a5ec4eSXin LI# possible 2nd code page number 158*43a5ec4eSXin LI>>>7 uleshort >1 159*43a5ec4eSXin LI>>>>11 uleshort x %u 160*43a5ec4eSXin LI# filename[260]; name of file like: dbaseos2.msg dde4c01e.msg os2ldr.mgr xdfh.msg ... 161*43a5ec4eSXin LI>41 string x \b, %s 162*43a5ec4eSXin LI 163b6cee71dSXin LI# OS/2 INI (this is a guess) 164b6cee71dSXin LI0 string \xff\xff\xff\xff\x14\0\0\0 OS/2 INI 165*43a5ec4eSXin LI!:mime application/x-os2-ini 166*43a5ec4eSXin LI!:ext ini 167*43a5ec4eSXin LI 168*43a5ec4eSXin LI# From: Joerg Jenderek 169*43a5ec4eSXin LI# URL: http://warpin.netlabs.org/ 170*43a5ec4eSXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/a/ark-wpi.trid.xml 171*43a5ec4eSXin LI# Note: called by TrID "WarpIN Installer" 172*43a5ec4eSXin LI# probably magic at the beginning 173*43a5ec4eSXin LI0 ubelong =0x770402BE WarpIN Installer 174*43a5ec4eSXin LI#>4 ubelong =0x03000000 175*43a5ec4eSXin LI#!:mime application/octet-stream 176*43a5ec4eSXin LI!:mime application/x-os2-wpi 177*43a5ec4eSXin LI!:ext wpi 178*43a5ec4eSXin LI# creator program name like: "reserved" or "WIC x.y.z" 179*43a5ec4eSXin LI>0x106 string x \b, created by %s 180*43a5ec4eSXin LI# name like: "reserved" or "OS/2 Netlabs" 181*43a5ec4eSXin LI>0x146 string x \b, '%s' 182*43a5ec4eSXin LI# name like: "N/A" "http://warpin.netlabs.org" 183*43a5ec4eSXin LI>0x186 string x \b, URL %s 184*43a5ec4eSXin LI 185