Some compile fixes, not enough
[erwise] / Cl / WWWLibrary / HTFile.h
1 /*                      File Access                             HTFile.h
2 **                      ===========
3 **
4 **      These are routines for file access used by WWW browsers.
5 **
6 */
7
8 #include "HTFormat.h"
9
10 /*      Convert filenames between local and WWW formats
11 **      -----------------------------------------------
12 **      Make up a suitable name for saving the node in
13 **
14 **      E.g.    $(HOME)/WWW/news/1234@cernvax.cern.ch
15 **              $(HOME)/WWW/http/crnvmc/FIND/xx.xxx.xx
16 */
17 #ifdef __STDC__
18 extern char * HTLocalName(const char * name);
19 #else
20 extern char * HTLocalName();
21 #endif
22
23 /*      Make a WWW name from a full local path name
24 **
25 */
26 extern char * WWW_nameOfFile PARAMS((const char * name));
27
28
29 /*      Generate the name of a cache file
30 */
31
32 extern char * HTCacheFileName PARAMS((CONST char * name));
33
34
35 /*      Determine file format from file name
36 **      ------------------------------------
37 */
38
39 #ifdef __STDC__
40 extern int HTFileFormat(const char * filename);
41 #else
42 extern int HTFileFormat();
43 #endif  
44
45
46 /*      Determine write access to a file
47 //      --------------------------------
48 //
49 // On exit,
50 //      return value    YES if file can be accessed and can be written to.
51 //
52 //      Isn't there a quicker way?
53 */
54
55 #ifdef __STDC__
56 extern BOOL HTEditable(const char * filename);
57 #else
58 extern BOOL HTEditable();
59 #endif
60
61
62 /*      Open a file descriptor for a document
63 **      -------------------------------------
64 **
65 ** On entry,
66 **      addr            must point to the fully qualified hypertext reference.
67 **
68 ** On exit,
69 **      returns         <0      Error has occured.
70 **                      >=0     Value of file descriptor or socket to be used
71 **                               to read data.
72 **      *pFormat        Set to the format of the file, if known.
73 **                      (See WWW.h)
74 **
75 */
76 extern int HTOpenFile
77 PARAMS
78 ((
79   const char * addr,
80   HTFormat * pFormat,
81   HTParentAnchor * anchor
82 ));
83