Annotation of libwww/Library/src/HTDescpt.html, revision 2.1

2.1     ! frystyk     1: <HTML>
        !             2: <HEAD>
        !             3: <TITLE>File descriptions</TITLE>
        !             4: </HEAD>
        !             5: <BODY>
        !             6: 
        !             7: <H1>File Descriptions</H1>
        !             8: 
        !             9: <PRE>
        !            10: /*
        !            11: **     (c) COPYRIGHT CERN 1994.
        !            12: **     Please first read the full copyright statement in the file COPYRIGH.
        !            13: */
        !            14: </PRE>
        !            15: 
        !            16: Descriptions appearing in directory listings are produced by this
        !            17: module.  This may be overridden by another module for those who which
        !            18: descriptions to come from somewhere else. <P>
        !            19: 
        !            20: This module is implemented by <A HREF="HTDescpt.c">HTDescpt.c</A>,
        !            21: and it is a part of the <A
        !            22: HREF="http://info.cern.ch/hypertext/WWW/Library/User/Guide/Guide.html">
        !            23: Library of Common Code</A>.
        !            24: 
        !            25: <PRE>
        !            26: #ifndef HTDESCRIPT_H
        !            27: #define HTDESCRIPT_H
        !            28: 
        !            29: </PRE>
        !            30: 
        !            31: <H2>Description File</H2>
        !            32: 
        !            33: This module gets descriptions from the file defined by global variable
        !            34: <CODE>HTHTDesctiptionFile</CODE> in the same directory. The default
        !            35: value is <CODE>.www_descript</CODE>:
        !            36: <PRE>
        !            37: extern char * HTDescriptionFile;
        !            38: </PRE>
        !            39: 
        !            40: In the description file lines starting with a word starting with 'D'
        !            41: are taken to be descriptions (this looks funny now, but this is to
        !            42: make it easy to extend these description files to contain also other
        !            43: information.
        !            44: <PRE>
        !            45: /*
        !            46:  * Example:
        !            47:  *     DESCRIBE  welcome.html  Our welcome page
        !            48:  *     DESCRIBE  map*.gif      Map as a GIF image
        !            49:  *     DESCRIBE  map*.ps       Map as a PostScript image
        !            50:  */
        !            51: </PRE>
        !            52: 
        !            53: 
        !            54: 
        !            55: <H2>HTML Titles</H2>
        !            56: 
        !            57: If description is not specified for a file that is of type
        !            58: <CODE>text/html</CODE>, this module uses the HTML TITLE as the
        !            59: description.  This feature can be turned off by setting the
        !            60: <CODE>HTPeekTitles</CODE> variable to false.
        !            61: <PRE>
        !            62: extern BOOL HTPeekTitles;
        !            63: </PRE>
        !            64: 
        !            65: 
        !            66: <H2>Read Description File</H2>
        !            67: 
        !            68: The description file for a directory is read in only once by
        !            69: <CODE>HTReadDescriptions()</CODE>, and the result returned by it is
        !            70: given as an argument when finding out a description for a single file.
        !            71: <PRE>
        !            72: extern HTList * HTReadDescriptions PARAMS((char * dirname));
        !            73: </PRE>
        !            74: 
        !            75: 
        !            76: <H2>Get Description For a File</H2>
        !            77: 
        !            78: Once description file has been read and the list of descriptions is
        !            79: returned by <CODE>HTReadDescriptions()</CODE>, the function
        !            80: <CODE>HTGetDescription()</CODE> can be used to get a description for a
        !            81: given file:
        !            82: <PRE>
        !            83: extern char * HTGetDescription PARAMS((HTList *        descriptions,
        !            84:                                       char *   dirname,
        !            85:                                       char *   filename,
        !            86:                                       HTFormat format));
        !            87: </PRE>
        !            88: Directory name has to be present because this function may then take a
        !            89: peek at the file itself (to get the HTML TITLE, for example).
        !            90: If <CODE>format</CODE> is <CODE>WWW_HTML</CODE> and description is not
        !            91: found, this module may be configured to use the HTML TITLE as the
        !            92: description. <P>
        !            93: 
        !            94: <STRONG>No string returned by this function should be freed!</STRONG>
        !            95: 
        !            96: 
        !            97: <H2>Freeing Descriptions</H2>
        !            98: 
        !            99: Once descriptions have been gotten, the description list returned by
        !           100: <CODE>HTReadDescriptions()</CODE> must be freed by
        !           101: <CODE>HTFreeDescriptions()</CODE>:
        !           102: <PRE>
        !           103: extern void HTFreeDescriptions PARAMS((HTList * descriptions));
        !           104: </PRE>
        !           105: 
        !           106: <PRE>
        !           107: #endif /* !HTDESCRIPT_H */
        !           108: </PRE>
        !           109: End of <CODE>HTDescpt.h</CODE>.
        !           110: </BODY>
        !           111: </HTML>

Webmaster