home *** CD-ROM | disk | FTP | other *** search
/ Blackhawk for Windows 95 1997 June / blackhawk-for-windows95-june19 / disc1 / internet / mail / w32_253.exe / FILETYPE.PM < prev    next >
Text File  |  1997-03-02  |  4KB  |  104 lines

  1. ;
  2. ; Pegasus Mail System,
  3. ; Copyright (c) 1990-97, David Harris, All Rights Reserved.
  4. ;
  5. ; File Typing Rules
  6. ;
  7. ; This file is used by Pegasus Mail to determine the "attachment type"
  8. ; information for files automatically. It consists of rules that can
  9. ; test a file's extension and any byte or strings in the first 512
  10. ; bytes of the file. Each line contains the complete set of rules for
  11. ; a single type of file, in the following format:
  12. ;
  13. ;    <file type>,<match type>,<operation>[,<operation>...]
  14. ;
  15. ;       "file type" is the WinPMail "attachment type" string that
  16. ;           should be used if a file matches this rule
  17. ;       "match type" is one of the following values:
  18. ;           0 : Match is good if any operation succeeds
  19. ;           1 : Match is only good if all operations succeed
  20. ;
  21. ;    "operation" is one or more groups of three parameters in
  22. ;    the following format:
  23. ;       <opcode>,<offset>,<string>
  24. ;           "opcode" is one of the following characters:
  25. ;               X : match the file's extension
  26. ;               B : match the single byte contained in "string"
  27. ;                   at offset "offset" in the file
  28. ;               S : match the string contained in "string" starting
  29. ;                   at offset "offset" in the file
  30. ;           "offset" is the offset to start matching in the file. For
  31. ;               matches by extension, it should be set to 0
  32. ;           "string" is the string or byte to match. It can be ASCII
  33. ;               characters, or escapes in the form "\xxx", where "xxx"
  34. ;               is exactly three decimal characters.
  35. ;
  36. ;  Examples:
  37. ;     MS-Word,0,X,0,.DOC
  38. ;        - Returns "MS-Word" if the file's extension is ".DOC".
  39. ;
  40. ;    PCEXE,1,X,0,.EXE,S,0,MZ
  41. ;        - Returns "PCEXE" if the file's extension is ".EXE"
  42. ;          AND the first two characters in the file are "MZ".
  43. ;
  44. ;     ZIP-Archive,0,X,0,.ZIP,S,0,PK\003
  45. ;        - Returns "ZIP-Archive" if the file's extension is ".ZIP"
  46. ;          OR the first three characters are "PK" and an ASCII 3.
  47. ;
  48. ; The matching process ends on the first viable match. Because of this,
  49. ; if you have both a specific set of rules and a general set of rules
  50. ; for any single file type, you should always place the general rules
  51. ; after the specific rules in the file to allow more reliable matching.
  52. ;
  53. ; The parser for this file is inflexible - you must get the format
  54. ; right. Note in particular that whitespace is not permitted, or if it
  55. ; is present, it is assumed to be significant. The only valid delimiter
  56. ; in this file is a comma; the only way you can match a comma in a
  57. ; string is by using the escape "\044".
  58. ;
  59. ; Blank lines and lines in this file starting with ';' or '#' are
  60. ; regarded as comments and are ignored.
  61. ;
  62.  
  63. MS-Word,1,S,0,\219\165\045
  64. PCEXE,1,X,0,.EXE,S,0,MZ
  65. PCEXE,1,X,0,.DLL,S,0,MZ
  66. PCEXE,0,X,0,.COM
  67. PCEXE,1,X,0,.DRV,S,0,MZ
  68. PCEXE,1,X,0,.VXD,S,0,MZ
  69. PCEXE,1,X,0,.VBX,S,0,MZ
  70. PCEXE,1,X,0,.OCX,S,0,MZ
  71. PCEXE,1,X,0,.CPL,S,0,MZ
  72. PCEXE,1,X,0,.386,S,0,MZ
  73. PCEXE,1,X,0,.2GR,S,0,MZ
  74. PCEXE,1,X,0,.3GR,S,0,MZ
  75. ZIP-archive,0,X,0,.ZIP,S,0,PK\003
  76. MS-Richtext,0,X,0,.RTF,S,0,{\092rtf
  77. Program-source,0,X,0,.C,X,0,.H,X,0,.PAS,X,0,.RC,X,0,.CPP,X,0,.BAS,X,0,.ASM
  78. GIF-image,0,X,0,.GIF,S,0,GIF
  79. JPEG-image,0,X,0,.JPG,S,6,JFIF
  80. BMP-image,0,X,0,.BMP,X,0,.DIB,S,0,BM
  81. WAV-sound-file,1,S,0,RIFF,S,8,WAVE
  82. WAV-sound-file,0,X,0,.WAV
  83. WordPerfect,0,S,1,WPC
  84. Excel-sheet,0,X,0,.XLS
  85. Excel-chart,0,X,0,.XLC
  86. MS-Access,0,X,0,.MDB
  87. AVI-Movie,1,S,0,RIFF,S,8,AVI
  88. AVI-Movie,0,X,0,.AVI
  89. Windows-help,1,X,0,.HLP,S,0,?_\003
  90. HTML-text,0,X,0,.HTM
  91. HTML-text,1,S,0,<HTML>
  92. PGP-encrypted,1,X,0,.PGP
  93. ARJ-archive,0,X,0,.ARJ
  94. ARC-archive,1,X,0,.ARC,S,0,\026
  95. LHArc-archive,1,X,0,.EXE,S,2,-lh5-
  96. Postscript,0,X,0,.PS,X,0,.EPS
  97. MS-Write,1,X,0,.WRI,S,0,\049\190
  98. Text,0,X,0,.INI
  99. Text,0,X,0,.TXT
  100. Text,0,X,0,.ME
  101. Text,0,X,0,.1ST
  102. Acrobat,1,X,0,.PDF,S,0,%PDF
  103.  
  104.