1 |
adcroft |
1.1 |
/* |
2 |
|
|
$Id: file.h,v 1.18 2002/03/19 08:41:54 whmoseley Exp $ |
3 |
|
|
** |
4 |
|
|
** This program and library is free software; you can redistribute it and/or |
5 |
|
|
** modify it under the terms of the GNU (Library) General Public License |
6 |
|
|
** as published by the Free Software Foundation; either version 2 |
7 |
|
|
** of the License, or any later version. |
8 |
|
|
** |
9 |
|
|
** This program is distributed in the hope that it will be useful, |
10 |
|
|
** but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 |
|
|
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 |
|
|
** GNU (Library) General Public License for more details. |
13 |
|
|
** |
14 |
|
|
** You should have received a copy of the GNU (Library) General Public License |
15 |
|
|
** along with this program; if not, write to the Free Software |
16 |
|
|
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
17 |
|
|
** |
18 |
|
|
** |
19 |
|
|
** added buffer size arg to grabStringValue prototype - core dumping from overrun |
20 |
|
|
** SRE 2/22/00 |
21 |
|
|
*/ |
22 |
|
|
|
23 |
|
|
|
24 |
|
|
#ifdef _WIN32 |
25 |
|
|
void make_windows_path( char *path ); |
26 |
|
|
#endif |
27 |
|
|
|
28 |
|
|
void normalize_path(char *path); |
29 |
|
|
|
30 |
|
|
int isdirectory(char *); |
31 |
|
|
int isfile(char *); |
32 |
|
|
int islink(char *); |
33 |
|
|
int getsize(char *); |
34 |
|
|
|
35 |
|
|
|
36 |
|
|
/* use these to open Index files (because they are binary files: Win32) */ |
37 |
|
|
FILE* openIndexFILEForWrite(char *); |
38 |
|
|
FILE* openIndexFILEForRead(char *); |
39 |
|
|
FILE* openIndexFILEForReadAndWrite(char *); |
40 |
|
|
void CreateEmptyFile(char *); |
41 |
|
|
|
42 |
|
|
void indexpath(SWISH *, char *); |
43 |
|
|
|
44 |
|
|
char *read_stream(SWISH *, char *name, FILE *fp, long len, long truncate_size); |
45 |
|
|
void flush_stream( FileProp *fprop ); |
46 |
|
|
|
47 |
|
|
|
48 |
|
|
/* Get/eval properties for file (2000-11 rasc) */ |
49 |
|
|
FileProp *file_properties (char *real_path, char *work_path, SWISH *sw); |
50 |
|
|
FileProp *init_file_properties (SWISH *sw); |
51 |
|
|
void init_file_prop_settings( SWISH *sw, FileProp *fprop ); |
52 |
|
|
void free_file_properties (FileProp *fprop); |
53 |
|
|
|
54 |
|
|
|
55 |
|
|
/* |
56 |
|
|
* Some handy routines for parsing the Configuration File |
57 |
|
|
*/ |
58 |
|
|
|
59 |
|
|
int grabCmdOptionsIndexFILE(char* line, char* commandTag, IndexFILE **listOfWords, int* gotAny, int dontToIt); |
60 |
|
|
|
61 |
|
|
FILE *create_tempfile(SWISH *sw, const char *mode, char *prefix, char **file_name_buffer, int remove_file_name ); |
62 |
|
|
|