12e1c341aSchristos 21b108b8bSchristos#------------------------------------------------------------------------------ 3*4c89978fSchristos# $File: os2,v 1.14 2022/03/21 21:25:50 christos Exp $ 41b108b8bSchristos# os2: file(1) magic for OS/2 files 51b108b8bSchristos# 61b108b8bSchristos 71b108b8bSchristos# Provided 1998/08/22 by 81b108b8bSchristos# David Mediavilla <davidme.news@REMOVEIFNOTSPAMusa.net> 9b04dc002Schristos1 search/100 InternetShortcut MS Windows 95 Internet shortcut text 10*4c89978fSchristos!:mime application/x-mswinurl 11*4c89978fSchristos!:ext url 12b04dc002Schristos>17 search/100 URL= (URL=< 13b04dc002Schristos>>&0 string x \b%s>) 141b108b8bSchristos 151b108b8bSchristos# OS/2 URL objects 161b108b8bSchristos# Provided 1998/08/22 by 171b108b8bSchristos# David Mediavilla <davidme.news@REMOVEIFNOTSPAMusa.net> 181b108b8bSchristos#0 string http: OS/2 URL object text 191b108b8bSchristos#>5 string >\ (WWW) <http:%s> 201b108b8bSchristos#0 string mailto: OS/2 URL object text 211b108b8bSchristos#>7 string >\ (email) <%s> 221b108b8bSchristos#0 string news: OS/2 URL object text 231b108b8bSchristos#>5 string >\ (Usenet) <%s> 241b108b8bSchristos#0 string ftp: OS/2 URL object text 251b108b8bSchristos#>4 string >\ (FTP) <ftp:%s> 261b108b8bSchristos#0 string file: OS/2 URL object text 271b108b8bSchristos#>5 string >\ (Local file) <%s> 281b108b8bSchristos 291b108b8bSchristos# >>>>> OS/2 INF/HLP <<<<< (source: Daniel Dissett ddissett@netcom.com) 306449c992Schristos# URL: http://fileformats.archiveteam.org/wiki/INF/HLP_(OS/2) 316449c992Schristos# Reference: http://www.edm2.com/0308/inf.html 321b108b8bSchristos# Carl Hauser (chauser.parc@xerox.com) and 331b108b8bSchristos# Marcus Groeber (marcusg@ph-cip.uni-koeln.de) 341b108b8bSchristos# list the following header format in inf02a.doc: 351b108b8bSchristos# 361b108b8bSchristos# int16 ID; // ID magic word (5348h = "HS") 371b108b8bSchristos# int8 unknown1; // unknown purpose, could be third letter of ID 381b108b8bSchristos# int8 flags; // probably a flag word... 391b108b8bSchristos# // bit 0: set if INF style file 401b108b8bSchristos# // bit 4: set if HLP style file 411b108b8bSchristos# // patching this byte allows reading HLP files 421b108b8bSchristos# // using the VIEW command, while help files 431b108b8bSchristos# // seem to work with INF settings here as well. 441b108b8bSchristos# int16 hdrsize; // total size of header 451b108b8bSchristos# int16 unknown2; // unknown purpose 461b108b8bSchristos# 471b108b8bSchristos0 string HSP\x01\x9b\x00 OS/2 INF 486449c992Schristos!:mime application/x-os2-inf 496449c992Schristos!:ext inf 501b108b8bSchristos>107 string >0 (%s) 511b108b8bSchristos0 string HSP\x10\x9b\x00 OS/2 HLP 526449c992Schristos!:mime application/x-os2-hlp 536449c992Schristos!:ext hlp 541b108b8bSchristos>107 string >0 (%s) 551b108b8bSchristos 566449c992Schristos# From: Joerg Jenderek 576449c992Schristos# URL: http://fileformats.archiveteam.org/wiki/MSG_(OS/2) 586449c992Schristos# Reference: https://github.com/OS2World/UTIL-SYSTEM-MKMSGF/blob/master/mkmsgf.h 596449c992Schristos# Note: created by MKMSGF.EXE. Text source can be recreated by E_MSGF 606449c992Schristos# example like OS001H.MSG 616449c992Schristos0 string \xffMKMSGF\0 OS/2 help message 626449c992Schristos!:mime application/x-os2-msg 636449c992Schristos!:ext msg 646449c992Schristos# identifier[3] like: DOS NET REX SYS ... 656449c992Schristos>8 string x '%.3s' 666449c992Schristos# msgnumber: number of messages 676449c992Schristos>11 uleshort x \b, %u messages 686449c992Schristos# firstmsgnumber; number of the first message like: some times 0 often 1 169 1000 3502 696449c992Schristos>13 uleshort >1 \b, 1st number %u 706449c992Schristos# offset16bit; 1~Index table has 16-bit offsets (files<64k) 0~Index table has 32-bit offsets 716449c992Schristos>15 ubyte =0 \b, 32-bit 726449c992Schristos#>15 ubyte =1 \b, 16-bit 736449c992Schristos# version; file version: 2~new 0~old 746449c992Schristos>16 uleshort !2 \b, version %u 756449c992Schristos# indextaboffset; offset of index table: 1F~after header 0~no index table for version 0? 766449c992Schristos>18 uleshort >0 77*4c89978fSchristos>>18 uleshort !0x1f \b, at %#x index 786449c992Schristos# 32-bit offset 796449c992Schristos>>15 ubyte =0 806449c992Schristos# offset with message table 81*4c89978fSchristos>>>(18.s) ulelong x \b, at %#x 826449c992Schristos# 1st message 836449c992Schristos# http://www.os2museum.com/files/docs/os210ptk/os2-1.0-ptk-tools-1988.pdf 846449c992Schristos# message type: E~Error H~Help I~Information P~Prompt W~Warning ? 856449c992Schristos>>>>(&-4.l) ubyte x %c-type 866449c992Schristos>>>>>&0 string x %s 876449c992Schristos# 16-bit offset 886449c992Schristos>>15 ubyte =1 896449c992Schristos# msgnum; message number 906449c992Schristos>>>(18.s) uleshort x \b, number %u 916449c992Schristos# msgindex; offset of message from begin of file 92*4c89978fSchristos>>>(18.s+2) uleshort x at %#x 936449c992Schristos# message type E H I P W ? 946449c992Schristos>>>>(&-2.s) ubyte x %c-type 956449c992Schristos# skip newline carriage return 966449c992Schristos>>>>>&0 ubeshort =0x0D0a 976449c992Schristos>>>>>>&0 string x %s 986449c992Schristos>>>>>&0 ubeshort !0x0D0a 996449c992Schristos>>>>>>&-2 string x %s 1006449c992Schristos# for version 0 index table apparently at offset 1F 1016449c992Schristos>16 uleshort 0 1026449c992Schristos>>15 ubyte 1 1036449c992Schristos# 1st message 16-bit 104*4c89978fSchristos>>>0x1F uleshort x \b, at %#x 1056449c992Schristos# message type: E~Error H~Help I~Information P~Prompt W~Warning ? 1066449c992Schristos>>>>(0x1F.s) ubyte x %c-type 1076449c992Schristos>>>>>&0 string x %s 1086449c992Schristos# 2nd message 16-bit 109*4c89978fSchristos>>>0x21 uleshort x \b, at %#x 1106449c992Schristos>>>>(0x21.s) ubyte x %c-type 1116449c992Schristos>>>>>&0 string x %s 1126449c992Schristos# 3rd message 16-bit 113*4c89978fSchristos>>>0x23 uleshort x \b, at %#x 1146449c992Schristos>>>>(0x23.s) ubyte x %c-type 1156449c992Schristos>>>>>&0 string x %s 1166449c992Schristos# version 0 32-bit 1176449c992Schristos>>15 ubyte 0 1186449c992Schristos# 1st message 32-bit 119*4c89978fSchristos>>>0x1f ulelong x \b, at %#x 1206449c992Schristos>>>>(0x1F.l) ubyte x %c-type 1216449c992Schristos>>>>>&0 string x %s 1226449c992Schristos# 2nd message 32-bit 123*4c89978fSchristos>>>0x23 ulelong x \b, at %#x 1246449c992Schristos>>>>(0x23.l) ubyte x %c-type 1256449c992Schristos>>>>>&0 string x %s 1266449c992Schristos# 3rd message 32-bit 127*4c89978fSchristos>>>0x27 ulelong x \b, AT %#x 1286449c992Schristos>>>>(0x27.l) ubyte x %c-type 1296449c992Schristos>>>>>&0 string x %s 1306449c992Schristos# countryinfo; offset of country info block: 0 for version 0 131*4c89978fSchristos>20 uleshort !0 \b, at %#x countryinfo 1326449c992Schristos# nextcoutryinfo 133*4c89978fSchristos>>22 uleshort >0 \b, at %#x next 1346449c992Schristos# reserved[5]; Must be 0 135*4c89978fSchristos>>25 ulelong !0 \b, RESERVED %#x 1366449c992Schristos>>(20.s) use os2-msg-info 1376449c992Schristos# display country info block of MKMSGF message file 1386449c992Schristos0 name os2-msg-info 1396449c992Schristos# bytesperchar; bytes per char: 1~SBCS 2~DBCS 1406449c992Schristos>0 ubyte >1 \b, %u bytes/char 1416449c992Schristos# reserved; Not known 142*4c89978fSchristos>1 uleshort !0 \b, reserved %#x 1436449c992Schristos# langfamilyID; language family ID like: 0~? 1~Arabic ... 7~German ... 9~English ... 34~Slovene 1446449c992Schristos>3 uleshort >0 \b, language %u 1456449c992Schristos# langversionID; like: 7_1~German 7_2~Swiss German 12_1~French 12_3~Canadian French 1466449c992Schristos>>5 uleshort x \b_%u 1476449c992Schristos# langfamilyID too high. This should not happen 1486449c992Schristos>3 uleshort >34 (invalid language) 1496449c992Schristos# codepagesnumber; number of codepages like: 1 2 ... 16 1506449c992Schristos>7 uleshort x \b, %u code page 1516449c992Schristos# plural s 1526449c992Schristos>7 uleshort >1 \bs 1536449c992Schristos# too many number of codepages. This should not happen 1546449c992Schristos>7 uleshort >16 (Too many) 1556449c992Schristos# codepages[16]; codepages list like 437 850 ... 1566449c992Schristos>7 uleshort <17 1576449c992Schristos# 1st code page 1586449c992Schristos>>9 uleshort >0 %u 1596449c992Schristos# possible 2nd code page number 1606449c992Schristos>>>7 uleshort >1 1616449c992Schristos>>>>11 uleshort x %u 1626449c992Schristos# filename[260]; name of file like: dbaseos2.msg dde4c01e.msg os2ldr.mgr xdfh.msg ... 1636449c992Schristos>41 string x \b, %s 1646449c992Schristos 1651b108b8bSchristos# OS/2 INI (this is a guess) 1661b108b8bSchristos0 string \xff\xff\xff\xff\x14\0\0\0 OS/2 INI 1676449c992Schristos!:mime application/x-os2-ini 1686449c992Schristos!:ext ini 1696449c992Schristos 170*4c89978fSchristos# From: Joerg Jenderek 171*4c89978fSchristos# URL: http://warpin.netlabs.org/ 172*4c89978fSchristos# Reference: http://mark0.net/download/triddefs_xml.7z/defs/a/ark-wpi.trid.xml 173*4c89978fSchristos# Note: called by TrID "WarpIN Installer" 174*4c89978fSchristos# probably magic at the beginning 175*4c89978fSchristos0 ubelong =0x770402BE WarpIN Installer 176*4c89978fSchristos#>4 ubelong =0x03000000 177*4c89978fSchristos#!:mime application/octet-stream 178*4c89978fSchristos!:mime application/x-os2-wpi 179*4c89978fSchristos!:ext wpi 180*4c89978fSchristos# creator program name like: "reserved" or "WIC x.y.z" 181*4c89978fSchristos>0x106 string x \b, created by %s 182*4c89978fSchristos# name like: "reserved" or "OS/2 Netlabs" 183*4c89978fSchristos>0x146 string x \b, '%s' 184*4c89978fSchristos# name like: "N/A" "http://warpin.netlabs.org" 185*4c89978fSchristos>0x186 string x \b, URL %s 186*4c89978fSchristos 187