75 "/ setup file-suffix to mimeType mapping ... |
75 "/ setup file-suffix to mimeType mapping ... |
76 |
76 |
77 #( |
77 #( |
78 "/ image formats ... |
78 "/ image formats ... |
79 |
79 |
80 'jpg' 'image/jpeg' |
80 'jpg' 'image/jpeg' |
81 'gif' 'image/gif' |
81 'gif' 'image/gif' |
82 'tif' 'image/tiff' |
82 ('tif' 'tiff') 'image/tiff' |
83 'xbm' 'image/x-xbitmap' |
83 'xbm' 'image/x-xbitmap' |
84 'xpm' 'image/x-xpixmap' |
84 'xpm' 'image/x-xpixmap' |
85 'png' 'image/x-png' |
85 'png' 'image/x-png' |
86 'pcd' 'image/x-photo-cd' |
86 'pcd' 'image/x-photo-cd' |
87 'bmp' 'image/x-MS-bmp' |
87 'bmp' 'image/x-MS-bmp' |
88 'rgb' 'image/x-rgb' |
88 'rgb' 'image/x-rgb' |
89 'ppm' 'image/x-portable-pixmap' |
89 'ppm' 'image/x-portable-pixmap' |
90 'pgm' 'image/x-portable-graymap' |
90 'pgm' 'image/x-portable-graymap' |
91 'pbm' 'image/x-portable-bitmap' |
91 'pbm' 'image/x-portable-bitmap' |
92 'pnm' 'image/x-portable-anymap' |
92 'pnm' 'image/x-portable-anymap' |
93 'xwd' 'image/x-xwindowdump' |
93 'xwd' 'image/x-xwindowdump' |
94 'ras' 'image/x-cmu-raster' |
94 'ras' 'image/x-cmu-raster' |
95 |
95 |
96 "/ misc text ... |
96 "/ misc text ... |
97 |
97 |
98 'htm' 'text/html' |
98 ('htm' 'html') 'text/html' |
99 'html' 'text/html' |
99 ('txt' 'text') 'text/plain' |
100 'txt' 'text/plain' |
100 |
101 'text' 'text/plain' |
101 'ps' 'application/postscript' |
102 |
102 'pdf' 'application/pdf' |
103 'ps' 'application/postscript' |
103 'rtf' 'application/rtf' |
104 'pdf' 'application/pdf' |
|
105 'rtf' 'application/rtf' |
|
106 |
104 |
107 "/ video formats ... |
105 "/ video formats ... |
108 |
106 |
109 'movie' 'video/x-sgi-movie' |
107 'movie' 'video/x-sgi-movie' |
110 'avi' 'video/x-msvideo' |
108 'avi' 'video/x-msvideo' |
111 'qt' 'video/quicktime' |
109 ('qt' 'mov' 'moov') 'video/quicktime' |
112 'mov' 'video/quicktime' |
110 ('mpv2' 'mp2' 'mpeg2') 'video/x-mpeg2' |
113 'moov' 'video/quicktime' |
111 ('mpv' 'mpegv' 'mpg' 'mpeg') 'video/mpeg' |
114 'mpv2' 'video/x-mpeg2' |
|
115 'mpv' 'video/mpeg' |
|
116 'mpegv' 'video/mpeg' |
|
117 'mpg' 'video/mpeg' |
|
118 'mpeg' 'video/mpeg' |
|
119 |
112 |
120 "/ audio formats ... |
113 "/ audio formats ... |
121 |
114 |
122 'ra' 'audio/x-pn-realaudio' |
115 'ra' 'audio/x-pn-realaudio' |
123 'mpa' 'audio/x-mpeg' |
116 ('mpa' 'mpega') 'audio/x-mpeg' |
124 'mpega' 'audio/x-mpeg' |
117 'wav' 'audio/x-wav' |
125 'wav' 'audio/x-wav' |
118 ('aif' 'aiff' 'aifc') 'audio/x-aiff' |
126 'aif' 'audio/x-aiff' |
119 ('au' 'snd') 'audio/basic' |
127 'aiff' 'audio/x-aiff' |
|
128 'aifc' 'audio/x-aiff' |
|
129 'au' 'audio/basic' |
|
130 'snd' 'audio/basic' |
|
131 |
120 |
132 "/ misc stuff |
121 "/ misc stuff |
133 |
122 |
134 'st' 'application/x-smalltalk-source' |
123 'st' 'application/x-smalltalk-source' |
135 'js' 'application/x-javascript' |
124 'js' 'application/x-javascript' |
|
125 'java' 'application/x-java-source' |
136 |
126 |
137 'tar' 'application/x-tar' |
127 'tar' 'application/x-tar' |
138 'tgz' 'application/x-tar-compressed' |
128 'tgz' 'application/x-tar-compressed' |
139 'zip' 'application/x-zip-compressed' |
129 'zip' 'application/x-zip-compressed' |
140 'sh' 'application/x-sh' |
130 'sh' 'application/x-sh' |
141 'tcl' 'application/x-tcl' |
131 'tcl' 'application/x-tcl' |
142 'pl' 'application/x-perl' |
132 'pl' 'application/x-perl' |
143 |
133 |
144 ) pairWiseDo:[:suff :type| |
134 ) pairWiseDo:[:suff :type| |
145 fileSuffixToTypeMapping at:suff put:type |
135 suff isArray ifTrue:[ |
|
136 suff do:[:s | fileSuffixToTypeMapping at:s put:type] |
|
137 ] ifFalse:[ |
|
138 fileSuffixToTypeMapping at:suff put:type |
|
139 ] |
146 ]. |
140 ]. |
147 |
141 |
148 "/ setup mimeType to image reader class mapping ... |
142 "/ setup mimeType to image reader class mapping ... |
149 |
143 |
150 typeToImageReaderClassMapping at:'image/jpeg' put:JPEGReader. |
144 typeToImageReaderClassMapping at:'image/jpeg' put:JPEGReader. |