Annotation of libwww/Library/src/HTBInit.c, revision 2.2
2.1 frystyk 1: /* HTBInit.c
2: ** STANDARD BINDINGS BETWEEN FILE SUFFIXES AND MEDIA TYPES
3: **
4: ** (c) COPYRIGHT MIT 1995.
5: ** Please first read the full copyright statement in the file COPYRIGH.
6: **
7: ** Define a basic set of suffixes and presentations
8: */
9:
10: /* Library include files */
2.2 ! frystyk 11: #include "sysdep.h"
2.1 frystyk 12: #include "HTUtils.h"
13: #include "HTFormat.h"
14: #include "HTBind.h"
15: #include "HTBInit.h" /* Implemented here */
16:
17: /* ------------------------------------------------------------------------- */
18:
19: /* BINDINGS BETWEEN FILE EXTENSIONS AND MEDIA TYPES
20: ** ------------------------------------------------
21: ** Not done automaticly - may be done by application!
22: ** The LAST suffix for a type is that used for temporary files of that
23: ** type. The quality is an apriori bias as to whether the file should be
24: ** used. Not that different suffixes can be used to represent files
25: ** which are of the same format but are originals or regenerated,
26: ** with different values.
27: */
28: PUBLIC void HTFileInit (void)
29: {
30: /* Suffix Content-Type Encoding Lang Quality */
31:
32: HTBind_add("mime", "message/rfc822", "8bit", NULL, 1.0); /* Internal -- MIME is */
33: /* not recursive */
34: HTBind_add("ai", "application/postscript", "8bit", NULL, 0.5); /* Adobe Illustrator */
35: HTBind_add("aif", "audio/x-aiff", "binary", NULL, 1.0);
36: HTBind_add("aifc", "audio/x-aiff", "binary", NULL, 1.0);
37: HTBind_add("aiff", "audio/x-aiff", "binary", NULL, 1.0);
38: HTBind_add("au", "audio/basic", "binary", NULL, 1.0);
39: HTBind_add("avi", "video/x-msvideo", "binary", NULL, 1.0); /* MS Video for Windows */
40: HTBind_add("bcpio", "application/x-bcpio", "binary", NULL, 1.0); /* Old binary CPIO */
41: HTBind_add("bin", "application/octet-stream", "binary", NULL, 1.0); /* Uninterpreted binary */
42: HTBind_add("c", "text/plain", "7bit", NULL, 0.5); /* C source */
43: HTBind_add("C", "text/plain", "7bit", NULL, 0.5); /* C++ source */
44: HTBind_add("cc", "text/plain", "7bit", NULL, 0.5); /* C++ source */
45: HTBind_add("cdf", "application/x-netcdf", "binary", NULL, 1.0);
46: HTBind_add("cpio", "application/x-cpio", "binary", NULL, 1.0); /* POSIX CPIO */
47: HTBind_add("csh", "application/x-csh", "7bit", NULL, 0.5); /* C-shell script */
48: HTBind_add("dvi", "application/x-dvi", "binary", NULL, 1.0); /* TeX DVI */
49: HTBind_add("eps", "application/postscript", "8bit", NULL, 0.8);
50: HTBind_add("etx", "text/x-setext", "7bit", NULL, 0.9); /* Struct Enchanced Txt */
51: HTBind_add("f90", "text/plain", "7bit", NULL, 0.5); /* Fortran 90 source */
52: HTBind_add("gif", "image/gif", "binary", NULL, 1.0); /* GIF */
53: HTBind_add("gtar", "application/x-gtar", "binary", NULL, 1.0); /* Gnu tar */
54: HTBind_add("h", "text/plain", "7bit", NULL, 0.5); /* C headers */
55: HTBind_add("hdf", "application/x-hdf", "binary", NULL, 1.0); /* NCSA HDF data file */
56: HTBind_add("hh", "text/plain", "7bit", NULL, 0.5); /* C++ headers */
57: HTBind_add("html", "text/html", "8bit", NULL, 1.0); /* HTML */
58: HTBind_add("ief", "image/ief", "binary", NULL, 1.0); /* Image Exchange fmt */
59: HTBind_add("JPE", "image/jpeg", "binary", NULL, 1.0);
60: HTBind_add("jpe", "image/jpeg", "binary", NULL, 1.0);
61: HTBind_add("JPEG", "image/jpeg", "binary", NULL, 1.0);
62: HTBind_add("jpeg", "image/jpeg", "binary", NULL, 1.0);
63: HTBind_add("JPG", "image/jpeg", "binary", NULL, 1.0);
64: HTBind_add("jpg", "image/jpeg", "binary", NULL, 1.0); /* JPEG */
65: HTBind_add("latex", "application/x-latex", "8bit", NULL, 1.0); /* LaTeX source */
66: HTBind_add("m", "text/plain", "7bit", NULL, 0.5); /* Objective-C source */
67: HTBind_add("man", "application/x-troff-man", "7bit", NULL, 0.5); /* Troff with man macros*/
68: HTBind_add("me", "application/x-troff-me", "7bit", NULL, 0.5); /* Troff with me macros */
69: HTBind_add("mov", "video/quicktime", "binary", NULL, 1.0);
70: HTBind_add("movie", "video/x-sgi-movie", "binary", NULL, 1.0); /* SGI "moviepalyer" */
71: HTBind_add("MPE", "video/mpeg", "binary", NULL, 1.0);
72: HTBind_add("mpe", "video/mpeg", "binary", NULL, 1.0);
73: HTBind_add("MPEG", "video/mpeg", "binary", NULL, 1.0);
74: HTBind_add("mpeg", "video/mpeg", "binary", NULL, 1.0);
75: HTBind_add("mpg", "video/mpeg", "binary", NULL, 1.0);
76: HTBind_add("MPG", "video/mpeg", "binary", NULL, 1.0); /* MPEG */
77: HTBind_add("ms", "application/x-troff-ms", "7bit", NULL, 0.5); /* Troff with ms macros */
78: HTBind_add("nc", "application/x-netcdf", "binary", NULL, 1.0); /* Unidata netCDF data */
79: HTBind_add("oda", "application/oda", "binary", NULL, 1.0);
80: HTBind_add("pbm", "image/x-portable-bitmap", "binary", NULL, 1.0); /* PBM Bitmap format */
81: HTBind_add("pdf", "application/pdf", "binary", NULL, 1.0);
82: HTBind_add("pgm", "image/x-portable-graymap", "binary", NULL, 1.0); /* PBM Graymap format */
83: HTBind_add("png", "image/png", "binary", NULL, 1.0); /* PNG */
84: HTBind_add("pnm", "image/x-portable-anymap", "binary", NULL, 1.0); /* PBM Anymap format */
85: HTBind_add("ppm", "image/x-portable-pixmap", "binary", NULL, 1.0); /* PBM Pixmap format */
86: HTBind_add("PS", "application/postscript", "8bit", NULL, 0.8); /* PostScript */
87: HTBind_add("ps", "application/postscript", "8bit", NULL, 0.8);
88: HTBind_add("qt", "video/quicktime", "binary", NULL, 1.0); /* QuickTime */
89: HTBind_add("ras", "image/cmu-raster", "binary", NULL, 1.0);
90: HTBind_add("rgb", "image/x-rgb", "binary", NULL, 1.0);
91: HTBind_add("roff", "application/x-troff", "7bit", NULL, 0.5);
92: HTBind_add("rtf", "application/x-rtf", "7bit", NULL, 1.0); /* RTF */
93: HTBind_add("rtx", "text/richtext", "7bit", NULL, 1.0); /* MIME Richtext format */
94: HTBind_add("sh", "application/x-sh", "7bit", NULL, 0.5); /* Shell-script */
95: HTBind_add("shar", "application/x-shar", "8bit", NULL, 1.0); /* Shell archive */
96: HTBind_add("snd", "audio/basic", "binary", NULL, 1.0); /* Audio */
97: HTBind_add("src", "application/x-wais-source", "7bit", NULL, 1.0); /* WAIS source */
98: HTBind_add("sv4cpio","application/x-sv4cpio", "binary", NULL, 1.0); /* SVR4 CPIO */
99: HTBind_add("sv4crc", "application/x-sv4crc", "binary", NULL, 1.0); /* SVR4 CPIO with CRC */
100: HTBind_add("t", "application/x-troff", "7bit", NULL, 0.5); /* Troff */
101: HTBind_add("tar", "application/x-tar", "binary", NULL, 1.0); /* 4.3BSD tar */
102: HTBind_add("tcl", "application/x-tcl", "7bit", NULL, 0.5); /* TCL-script */
103: HTBind_add("tex", "application/x-tex", "8bit", NULL, 1.0); /* TeX source */
104: HTBind_add("texi", "application/x-texinfo", "7bit", NULL, 1.0); /* Texinfo */
105: HTBind_add("texinfo","application/x-texinfo", "7bit", NULL, 1.0);
106: HTBind_add("tif", "image/tiff", "binary", NULL, 1.0); /* TIFF */
107: HTBind_add("tiff", "image/tiff", "binary", NULL, 1.0);
108: HTBind_add("tr", "application/x-troff", "7bit", NULL, 0.5);
109: HTBind_add("tsv", "text/tab-separated-values", "7bit", NULL, 1.0); /* Tab-separated values */
110: HTBind_add("txt", "text/plain", "7bit", NULL, 0.5); /* Plain text */
111: HTBind_add("ustar", "application/x-ustar", "binary", NULL, 1.0); /* POSIX tar */
112: HTBind_add("wav", "audio/x-wav", "binary", NULL, 1.0); /* Windows+ WAVE format */
113: HTBind_add("xbm", "image/x-xbitmap", "binary", NULL, 1.0); /* X bitmap */
114: HTBind_add("xpm", "image/x-xpixmap", "binary", NULL, 1.0); /* X pixmap format */
115: HTBind_add("xwd", "image/x-xwindowdump", "binary", NULL, 1.0); /* X window dump (xwd) */
116:
117: HTBind_add("zip", NULL, "zip", NULL, 1.0); /* PKZIP */
118: HTBind_add("Z", NULL, "compress", NULL, 1.0); /* Compressed data */
119: HTBind_add("gz", NULL, "gzip", NULL, 1.0); /* Gnu Compressed data */
120:
121: HTBind_add("conf", "application/x-www-rules", "8bit", NULL, 1.0); /* CONFIGURATION FILE */
122:
123: HTBind_add("*.*", "www/unknown", "binary", NULL, 0.1); /* Unknown suffix */
124: HTBind_add("*", "www/unknown", "7bit", NULL, 0.5); /* No suffix */
125: }
126:
Webmaster