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