home *** CD-ROM | disk | FTP | other *** search
/ The AGA Experience 2 / agavol2.iso / s / filetypes < prev    next >
Text File  |  1995-02-02  |  9KB  |  454 lines

  1. # WhatIs.library Copyright by Sylvain Rougier and Pierre Carrette
  2. # send donnation bug/report to :
  3. # Sylvain Rougier
  4. # 39 rue carnot
  5. # 86000 Poitiers
  6. # France
  7. #
  8. # For commercial use, ask written permision.
  9. # For non-comercial use, you can redistribute whatis.library package
  10. #
  11.  
  12. # "# " = Comment
  13.  
  14. # example definition:
  15. TYPE "Src Ada"        # you define a new type, its IDString (curently 9
  16.             # char max) is "Src Ada", this is the string that
  17.             # will be returned by WhatIs.library and you can see it in
  18.             # BrowserII when you put the "Show file type", it
  19.             # is also the way you identify this FileType.
  20.  
  21.     SUBTYPE "Text"    # OPT:  the file MUST be prior of the type "Text",
  22.             # this  means  that if the file is not of the type
  23.             # test,  WhatIs.library  think  it is not the type
  24.             # "Src Ada"
  25.  
  26.     INSERTAFTER "Script"    # OPT:  You want that the type "Src Ada"
  27.                 # was  put after the type "Script", it not
  28.                 # an alpha order but an arbitrary FileType
  29.                 # order, you can see this order when you
  30.                 # choose "Sort by file type" in BrowserII
  31.  
  32.     ICONNAME "def_Src Ada"        # OPT:  this the name of the default icon
  33.                     # file  name, in case the file you
  34.                     # examine haven't, this is only the
  35.                     # file   name   (   returned   by
  36.                     # GetIconName()) whitout any path,
  37.                     # it  is  to  the  appli-prog  to
  38.                     # search   it  in  the  apropiate
  39.                     # directory.     (commnly    the
  40.                     # "ENV:Sys/" directory)
  41.  
  42.     # now come the decription of the file, if ANY condition below is
  43.     # not reach, the WhatIs.library say it is not this filetype.
  44.     # Exepte for OPNAMEPATTERN which is use for light WhatIs() (only
  45.     # based on the file name)
  46.  
  47.     NAMEPATTERN "#?.ada"    # OPT:  if the filename don't match to this
  48.                 # pattern, it not of this FileType
  49.                 # it is exclusive whith OPTNAMEPATTERN
  50.  
  51. #    OPTNAMEPATTERN "#?.ada"        # OPT:  same thing than NAMEPATTERN but it
  52.                     # use ONLY if no DEEP scan is
  53.                     # available ( light WhatIs() ), in
  54.                     # any other scan ( for instance
  55.                     # DEEP scan), it is IGNORED
  56.  
  57.     # now come the DEEP desciption, it is the heart of reconised
  58.     # process.  You can specify number in decimal ( begining whith
  59.     # nothing), in hex ( begining whith "$"), in binary (begining
  60.     # whith "%"), or in string (begining whith '"')
  61.     #  All  the search ( and acces) are in the first few byte of file (
  62.     # currently 484)
  63.     #  all  this  contion  are  optional.  and is considered as TRUE if
  64.     # light WhatIs
  65.  
  66.     COMPAREBYTE 12 $ABADCAFE    # test if the file contain the byte $AB
  67.                     # $AD $CA $FE at offset 12
  68.  
  69.     COMPAREBYTE $23 "Hello"        #  test  if  the file contain the string
  70.                     #  "Hello"  (  i.e the byte $48 $65
  71.                     # $6c $6f) at offset $23 ( decimal 35)
  72.  
  73.     # in version 2 of WhatIs.library ( only unde KS2.x) you have a CASE
  74.     # modifier, this means "A" is different of "a".
  75.  
  76.     SEARCHBYTE "Good"    #  search  in  the  first  few  byte  of file (
  77.                 #  currently  480  first  byte)  the string
  78.                 # "Good"
  79.  
  80.     SEARCHBYTE $DEADBEEF    #  search the byte $DE $AD $BE $EF (in this
  81.                 #  order  and  in succetion) in the file
  82.  
  83.     SEARCHPATTERN "ST-??:"    # search if the pattern "ST-??:" are present
  84.                 # in the file.
  85. ENDTYPE    # this mark the end of this FileType definition
  86. #######################################################################
  87.  
  88. TYPE "Icn Disk"
  89.     SUBTYPE "Icon"
  90.     INSERTAFTER "Icon"
  91.     OPTNAMEPATTERN "Disk.info"
  92.     COMPAREBYTE $30 $01
  93. ENDTYPE
  94.  
  95. TYPE "Icn Drw"
  96.     SUBTYPE "Icon"
  97.     INSERTAFTER "Icn Disk"
  98.     COMPAREBYTE $30 $02
  99. ENDTYPE
  100.  
  101. TYPE "Icn Tool"
  102.     SUBTYPE "Icon"
  103.     INSERTAFTER "Icn Drw"
  104.     COMPAREBYTE $30 $03
  105. ENDTYPE
  106.  
  107. TYPE "Icn Pjct"
  108.     SUBTYPE "Icon"
  109.     INSERTAFTER "Icn Tool"
  110.     COMPAREBYTE $30 $04
  111. ENDTYPE
  112.  
  113. TYPE "Icn Grbg"
  114.     SUBTYPE "Icon"
  115.     INSERTAFTER "Icn Pjct"
  116.     COMPAREBYTE $30 $05
  117. ENDTYPE
  118.  
  119. TYPE "PPLoadSeg"
  120.     INSERTAFTER "PP40 Exe"
  121.     COMPAREBYTE 0 "PPLS"
  122. ENDTYPE
  123.  
  124. TYPE "PPLibHead"
  125.     INSERTAFTER "PP40 Exe"
  126.     COMPAREBYTE $78 $FE864CDF7FFF4E75
  127. ENDTYPE
  128.  
  129. TYPE "ImpLS"    # executable imploded whith Imploder-Library root to alow crunche of amiga device/fonts/library
  130.         SUBTYPE "Exe"
  131.         INSERTAFTER "PPLoadSeg"
  132.         SEARCHBYTE "explode.library"
  133. ENDTYPE
  134.  
  135. TYPE "ImpLS Lib"    # library imploded whith Imploder-Library root to alow crunche of amiga device/fonts/library
  136.         SUBTYPE "ImpLS"
  137.         INSERTAFTER "ImpLS"
  138.         NAMEPATTERN "#?.library#?"
  139. ENDTYPE
  140.  
  141. #TYPE "Library"
  142. #    SUBTYPE "Exe"
  143. #    INSERTAFTER "ImpLS Lib"
  144. #    NAMEPATTERN "#?.library#?"
  145. #ENDTYPE
  146.  
  147. TYPE "Doc"
  148.     SUBTYPE "Text"
  149.     INSERTAFTER    "Text"
  150.     ICONNAME    "def_doc"
  151.     NAMEPATTERN "#?.doc~(#?.INFO)"
  152. ENDTYPE
  153.  
  154. TYPE "Source C"
  155.     SUBTYPE "Text"
  156.     ICONNAME    "def_Source C"
  157.     NAMEPATTERN "#?.c"
  158. ENDTYPE
  159.  
  160. TYPE "Include C"
  161.     SUBTYPE "Text"
  162.     ICONNAME    "def_Include C"
  163.     NAMEPATTERN "#?.h"
  164. ENDTYPE
  165.  
  166. TYPE "Asm"
  167.     SUBTYPE "Text"
  168.     ICONNAME    "def_Asm"
  169.     NAMEPATTERN "#?.(a|s|asm)"
  170. ENDTYPE
  171.  
  172. TYPE "Incld Asm"
  173.     SUBTYPE "Text"
  174.     ICONNAME    "def_Include Asm"
  175.     NAMEPATTERN "#?.i"
  176. ENDTYPE
  177.  
  178. TYPE "Rexx"
  179.     SUBTYPE "Text"
  180.     ICONNAME    "def_Rexx"
  181.     NAMEPATTERN "#?.rexx"
  182. ENDTYPE
  183.  
  184. TYPE "Tex"
  185.     SUBTYPE "Text"
  186.     ICONNAME    "def_Tex"
  187.     NAMEPATTERN "#?.Tex"
  188. ENDTYPE
  189.  
  190. TYPE "PS"
  191.     SUBTYPE "Text"
  192.     ICONNAME    "def_PostScript"
  193.     OPTNAMEPATTERN "#?.ps"
  194.     SEARCHBYTE "Adobe"
  195. ENDTYPE
  196.  
  197. TYPE "Guide"
  198.     SUBTYPE "Text"
  199.     ICONNAME    "def_Guide"
  200.     OPTNAMEPATTERN "#?.Guide"
  201.     COMPAREBYTE 0 "@database"
  202. ENDTYPE
  203.  
  204. TYPE "ABasic"
  205.     NAMEPATTERN "#?.bas"
  206. ENDTYPE
  207.  
  208. TYPE "GFA"
  209.     OPTNAMEPATTERN "#?.GFA"
  210.     COMPAREBYTE 2 "GFA-AMIGAB"
  211. ENDTYPE
  212.  
  213. TYPE MakeFile
  214.     SUBTYPE "Text"
  215.     ICONNAME    "def_MakeFile"
  216.     NAMEPATTERN    "MakeFile|SMakeFile|LmkFile"
  217. ENDTYPE
  218.  
  219. TYPE ReadMe
  220.     SUBTYPE "Text"
  221.     ICONNAME "def_ReadMe"
  222.     NAMEPATTERN "Read#?Me"
  223. ENDTYPE
  224.  
  225. TYPE "PP Doc"
  226.     SUBTYPE "PP Data"
  227.     ICONNAME "def_PP Doc"
  228.     NAMEPATTERN "#?.doc.pp#?"
  229. ENDTYPE
  230.  
  231. TYPE "SFX"    #Self extracting LHA/LZH file
  232.     SUBTYPE "Exe"
  233.     INSERTAFTER "LHArc"
  234.     ICONNAME "def_SFX"
  235.     OPTNAMEPATTERN "#?.run"
  236.     COMPAREBYTE 44 "SFX"
  237. ENDTYPE
  238.     
  239. TYPE "Tex Font"
  240.     COMPAREBYTE 0 $F7593647
  241. ENDTYPE
  242.  
  243. TYPE "Tex DVI"
  244.     OPTNAMEPATTERN "#?.dvi"
  245.     COMPAREBYTE 0 $F7020183
  246. ENDTYPE
  247.  
  248. TYPE "DMS"
  249.     OPTNAMEPATTERN "#?.dms"
  250.     COMPAREBYTE 0 "DMS!"
  251. ENDTYPE
  252.  
  253. TYPE "Warp"
  254.     OPTNAMEPATTERN "#?.wrp"
  255.     COMPAREBYTE 0 "Warp"
  256. ENDTYPE
  257.  
  258. TYPE "Zoom"
  259.     OPTNAMEPATTERN "#?.zoom"
  260.     COMPAREBYTE 0 "ZOOM"
  261. ENDTYPE
  262.  
  263. TYPE "ZIP"
  264.     OPTNAMEPATTERN "#?.zip"
  265.     COMPAREBYTE 0 $504B0304
  266. ENDTYPE
  267.  
  268. TYPE "Manx DMP"
  269.     OPTNAMEPATTERN "#?.dmp"
  270.     COMPAREBYTE 0 "djg!"
  271. ENDTYPE
  272.  
  273. TYPE "Manx DBG"
  274.     OPTNAMEPATTERN "#?.dbg"
  275.     COMPAREBYTE 0 $35D2
  276. ENDTYPE
  277.  
  278. TYPE "PPM V1.8"
  279.     COMPAREBYTE 0 $07231988
  280. ENDTYPE
  281.  
  282. TYPE "PPM V2.1"
  283.     COMPAREBYTE 0 $07231988
  284. ENDTYPE
  285.  
  286. TYPE "MEd Song"
  287.     OPTNAMEPATTERN "#?.med"
  288.     COMPAREBYTE 0 $4d454404
  289.     # "MED" $04
  290. ENDTYPE
  291.  
  292. TYPE "STSong"
  293.     COMPAREBYTE 0 "PACK"
  294. ENDTYPE
  295.  
  296. TYPE "ST Mod"
  297.     OPTNAMEPATTERN "(mod.#?|#?.mod)"
  298.     COMPAREBYTE $32 "ST-"
  299.     COMPAREBYTE $37 ":"
  300.     COMPAREBYTE $50 "ST-"
  301.     COMPAREBYTE $55 ":"
  302. #    SEARCHPATTERN "#?st-??:#?"
  303. ENDTYPE
  304.  
  305. TYPE "PP ST Mod"
  306.     SUBTYPE "PP Data"
  307.     NAMEPATTERN "(#?mod.#?|#?.mod#?)"
  308. ENDTYPE
  309.     
  310. TYPE "JPEG"
  311.     OPTNAMEPATTERN "#?.(jpeg|jpg)"
  312.     COMPAREBYTE 0 $FFD8FFE0
  313. ENDTYPE
  314.  
  315. TYPE "PCX"
  316.     OPTNAMEPATTERN "#?.pcx#?"
  317.     COMPAREBYTE 0 $0a0501
  318. ENDTYPE
  319.  
  320. TYPE "GIF"
  321.     OPTNAMEPATTERN "#?.gif#?"
  322.     COMPAREBYTE 0 "GIF8"
  323.     COMPAREBYTE 5 "a"
  324. ENDTYPE
  325.  
  326. TYPE "BMP"
  327.     OPTNAMEPATTERN "#?.bmp#?"
  328.     COMPAREBYTE 0 "BM"
  329.     COMPAREBYTE 6 $00000000
  330. ENDTYPE
  331. TYPE "BMP 1Bit"
  332.     SUBTYPE "BMP"
  333.     COMPAREBYTE $1c $01
  334. ENDTYPE
  335. TYPE "BMP 4Bit"
  336.     SUBTYPE "BMP"
  337.     COMPAREBYTE $1c $04
  338. ENDTYPE
  339. TYPE "BMP 8Bit"
  340.     SUBTYPE "BMP"
  341.     COMPAREBYTE $1c $08
  342. ENDTYPE
  343.  
  344. TYPE "TARGA"
  345.     OPTNAMEPATTERN "#?.tga#?"
  346.     COMPAREBYTE 0 $00000A0000000000000000008002E001
  347. ENDTYPE
  348.  
  349. TYPE "TIFF"
  350.     OPTNAMEPATTERN "#?.tif#?"
  351.     COMPAREBYTE 0 "MM"
  352. ENDTYPE
  353.  
  354. TYPE "TIFF Gray"
  355.     OPTNAMEPATTERN "#?.tif#?"
  356.     COMPAREBYTE 0 $49492A00
  357. ENDTYPE
  358.  
  359. TYPE "SUNRASTER"
  360.     COMPAREBYTE 0 $59A66A95
  361. ENDTYPE
  362.  
  363. TYPE "Wave"
  364.     OPTNAMEPATTERN "#?.wav#?"
  365.     COMPAREBYTE 0 "RIFF"
  366.     COMPAREBYTE 8 "WAVE"
  367. ENDTYPE
  368.  
  369. TYPE "MaxiPlan"
  370.     COMPAREBYTE 0 $474c424c
  371. ENDTYPE
  372.  
  373. TYPE "Mnx5.0Obj"
  374.     INSERTAFTER "Object"
  375.     ICONNAME "def_Mnx5.0Obj"
  376.     COMPAREBYTE 0 $434a
  377. ENDTYPE
  378.  
  379. TYPE "Mnx3.6Obj"
  380.     INSERTAFTER "Object"
  381.     ICONNAME "def_Mnx3.6Obj"
  382.     COMPAREBYTE 0 $414a
  383. ENDTYPE
  384.  
  385. TYPE "Mnx5.0Lib"
  386.     INSERTAFTER "Object"
  387.     ICONNAME "def_Mnx5.0Lib"
  388.     COMPAREBYTE 0 $636a
  389. ENDTYPE
  390.  
  391. TYPE "Mnx3.6Lib"
  392.     INSERTAFTER "Object"
  393.     ICONNAME "def_Mnx3.6Lib"
  394.     COMPAREBYTE 0 $616a
  395. ENDTYPE
  396.  
  397. TYPE "Imagine"
  398.     SUBTYPE "IFF"
  399.     INSERTAFTER "FTXT"
  400.     ICONNAME "def_Imagine"
  401.     COMPAREBYTE 8 "TDDD"
  402. ENDTYPE
  403.  
  404. TYPE "CDAF"                        # Compressed Data Archive File
  405.     SUBTYPE "IFF"
  406.     ICONNAME "def_CDAF"
  407.     COMPAREBYTE 8 "CDAF"
  408. ENDTYPE
  409.  
  410. TYPE "Shrink"
  411.     SUBTYPE "CDAF"
  412.     ICONNAME "def_Shrink"
  413.     OPTNAMEPATTERN "#?.shr"
  414.     COMPAREBYTE 20 "shrinkFILE"    # 20 is offset of archiver name
  415. ENDTYPE
  416.  
  417. TYPE "Caligari"
  418.     ICONNAME "def_Caligari"
  419.     COMPAREBYTE 0 "CALB"
  420. ENDTYPE
  421.  
  422. TYPE "BAD IFF"
  423.     SEARCHBYTE "FORM"
  424. ENDTYPE
  425.  
  426. TYPE "Vista DEM"
  427.     ICONNAME "def_Vista_DEM"
  428.     OPTNAMEPATTERN "#?.DEM#?"
  429.     COMPAREBYTE 0 "Vista DEM File"
  430. ENDTYPE
  431.  
  432. TYPE "PP MEdMOD"
  433.     SUBTYPE "PP Data"
  434.     INSERTAFTER "MEd MOD"
  435.     ICONNAME "def_PP MEd MOD"
  436.     NAMEPATTERN "#?.mmd.pp#?"
  437. ENDTYPE
  438.  
  439. TYPE "EPUed"
  440.     COMPAREBYTE 0 $018063680561
  441. ENDTYPE
  442.     TYPE "EPU-XPK"
  443.         SUBTYPE "EPUed"
  444.         COMPAREBYTE $10 "xpk"
  445.     ENDTYPE
  446.         TYPE "EPU-NUKE"
  447.             SUBTYPE "EPU-XPK"
  448.             COMPAREBYTE $13 "NUKE"
  449.         ENDTYPE
  450.  
  451. TYPE "GZip"
  452.     COMPAREBYTE 0 $1F8B0800
  453. ENDTYPE
  454.