HTDescpt.h
上传用户:zlh9724
上传日期:2007-01-04
资源大小:1991k
文件大小:3k
源码类别:

浏览器

开发平台:

Unix_Linux

  1. /*                                                                          File descriptions
  2.                                     FILE DESCRIPTIONS
  3.                                              
  4.  */
  5. /*
  6. **      (c) COPYRIGHT MIT 1995.
  7. **      Please first read the full copyright statement in the file COPYRIGH.
  8. */
  9. /*
  10.    Descriptions appearing in directory listings are produced by this module. This may be
  11.    overridden by another module for those who which descriptions to come from somewhere
  12.    else. It's only HTTP directory listings that contain a description field (if enabled by
  13.    the Directory browsing module.
  14.    
  15.    This module is implemented by HTDescpt.c, and it is a part of the  W3C Reference
  16.    Library.
  17.    
  18.  */
  19. #ifndef HTDESCRIPT_H
  20. #define HTDESCRIPT_H
  21. /*
  22. Description File
  23.    This module gets descriptions from the file defined by global variable
  24.    HTDescriptionFile in the same directory as the directoy to be listed. The default value
  25.    is .www_descript:
  26.    
  27.  */
  28. extern char * HTDescriptionFile;
  29. /*
  30.    In the description file lines starting with a word starting with 'D' are taken to be
  31.    descriptions (this looks funny now, but this is to make it easy to extend these
  32.    description files to contain also other information. An example of the format of the
  33.    description file is:
  34.    
  35.  */
  36. /*
  37. **      DESCRIBE  welcome.html  Our welcome page
  38. **      DESCRIBE  map*.gif      Map as a GIF image
  39. **      DESCRIBE  map*.ps       Map as a PostScript image
  40. */
  41. /*
  42. HTML Titles
  43.    If description is not specified for a file that is of type text/html, this module uses
  44.    the HTML TITLE as the description.  This feature can be turned off by setting the
  45.    HTPeekTitles variable to false.
  46.    
  47.  */
  48. extern BOOL HTPeekTitles;
  49. /*
  50. Read Description File
  51.    The description file for a directory is read in only once by HTReadDescriptions(), and
  52.    the result returned by it is given as an argument when finding out a description for a
  53.    single file.
  54.    
  55.  */
  56. extern HTList * HTReadDescriptions (char * dirname);
  57. /*
  58. Get Description For a File
  59.    Once description file has been read and the list of descriptions is returned by
  60.    HTReadDescriptions(), the function HTGetDescription() can be used to get a description
  61.    for a given file:
  62.    
  63.  */
  64. extern char * HTGetDescription (HTList *        descriptions,
  65.                                        char *   dirname,
  66.                                        char *   filename,
  67.                                        HTFormat format);
  68. /*
  69.    Directory name has to be present because this function may then take a peek at the file
  70.    itself (to get the HTML TITLE, for example). If format is WWW_HTML and description is
  71.    not found, this module may be configured to use the HTML TITLE as the description.
  72.    
  73.    No string returned by this function should be freed!
  74.    
  75. Freeing Descriptions
  76.    Once descriptions have been gotten, the description list returned by
  77.    HTReadDescriptions() must be freed by HTFreeDescriptions():
  78.    
  79.  */
  80. extern void HTFreeDescriptions (HTList * descriptions);
  81. /*
  82.  */
  83. #endif /* !HTDESCRIPT_H */
  84. /*
  85.    End of HTDescpt.h. */