version 1.1, 1993/02/03 09:52:42
|
version 1.2, 1993/04/05 14:40:29
|
Line 9
|
Line 9
|
#define HTFILE_H |
#define HTFILE_H |
|
|
#include "HTFormat.h" |
#include "HTFormat.h" |
|
#include "HTAccess.h" |
|
|
|
|
|
/* Controlling globals |
|
*/ |
|
extern int HTDirAccess; /* Directory access level */ |
|
|
|
#define HT_DIR_FORBID 0 /* Altogether forbidden */ |
|
#define HT_DIR_SELECTIVE 1 /* If .www_browsable exists */ |
|
#define HT_DIR_OK 2 /* Any accesible directory */ |
|
|
|
#define HT_DIR_ENABLE_FILE ".www_browsable" /* If exists, can browse */ |
|
|
|
extern int HTDirReadme; /* Include readme files? */ |
|
/* Values: */ |
|
#define HT_DIR_README_NONE 0 |
|
#define HT_DIR_README_TOP 1 |
|
#define HT_DIR_README_BOTTOM 2 |
|
|
|
#define HT_DIR_README_FILE "README" |
|
|
|
|
/* Convert filenames between local and WWW formats |
/* Convert filenames between local and WWW formats |
** ----------------------------------------------- |
** ----------------------------------------------- |
Line 35 extern char * WWW_nameOfFile PARAMS((con
|
Line 56 extern char * WWW_nameOfFile PARAMS((con
|
extern char * HTCacheFileName PARAMS((CONST char * name)); |
extern char * HTCacheFileName PARAMS((CONST char * name)); |
|
|
|
|
|
/* Define the representation for a file suffix |
|
** ------------------------------------------- |
|
** |
|
** On entry, |
|
** suffix includes the "." if that is important (normally, yes!) |
|
** representation is MIME-style |
|
** quality an a priori judgement of the quality of such files |
|
** |
|
** Example: HTSetSuffix(".ps", "application/postscript", 1.0); |
|
** |
|
*/ |
|
|
|
extern void HTSetSuffix PARAMS(( |
|
CONST char * suffix, |
|
CONST char * representation, |
|
float quality)); |
|
|
|
|
/* Determine file format from file name |
/* Determine file format from file name |
** ------------------------------------ |
** ------------------------------------ |
*/ |
*/ |
|
|
#ifdef __STDC__ |
#ifdef __STDC__ |
extern int HTFileFormat(const char * filename); |
extern HTFormat HTFileFormat(const char * filename); |
#else |
#else |
extern int HTFileFormat(); |
extern HTFormat HTFileFormat(); |
#endif |
#endif |
|
|
|
|
|
/* Determine file format from file name |
|
** ------------------------------------ |
|
*/ |
|
|
|
extern float HTFileValue PARAMS((CONST char * filename)); |
|
|
|
|
/* Determine write access to a file |
/* Determine write access to a file |
// -------------------------------- |
// -------------------------------- |
// |
// |
Line 62 extern BOOL HTEditable();
|
Line 108 extern BOOL HTEditable();
|
#endif |
#endif |
|
|
|
|
|
/* Determine a suitable suffix, given the representation |
|
** ----------------------------------------------------- |
|
** |
|
** On entry, |
|
** rep is the atomized MIME style representation |
|
** |
|
** On exit, |
|
** returns a pointer to a suitable suffiz string if one has been |
|
** found, else NULL. |
|
*/ |
|
extern CONST char * HTFileSuffix PARAMS((HTAtom* rep)); |
|
|
|
|
/* Open a file descriptor for a document |
/* Open a file descriptor for a document |
** ------------------------------------- |
** ------------------------------------- |
** |
** |
Line 76 extern BOOL HTEditable();
|
Line 135 extern BOOL HTEditable();
|
** (See WWW.h) |
** (See WWW.h) |
** |
** |
*/ |
*/ |
|
/* |
extern int HTLoadFile |
extern int HTLoadFile |
PARAMS |
PARAMS |
(( |
(( |
const char * addr, |
const char * addr, |
HTFormat * pFormat, |
|
HTParentAnchor * anchor, |
HTParentAnchor * anchor, |
int diagnostic |
int diagnostic |
)); |
)); |
|
*/ |
extern HTProtocol HTFTP, HTFile; |
extern HTProtocol HTFTP, HTFile; |
#endif /* HTFILE_H / |
#endif /* HTFILE_H */ |