1 /* ---------------------------------------------------------------------- *
2  * fileutil.h
3  * This file is part of lincity.
4  * Lincity is copyright (c) I J Peters 1995-1997, (c) Greg Sharp 1997-2001.
5  * ---------------------------------------------------------------------- */
6 #ifndef __fileutil_h__
7 #define __fileutil_h__
8 
9 extern char *lc_save_dir;
10 extern char *lc_temp_file;
11 extern int lc_save_dir_len;
12 //extern int make_dir_ok_flag;
13 
14 /* Try to find the maximum file name from OS */
15 #if defined (_POSIX_PATH_MAX)          /* Posix */
16 #define LC_PATH_MAX _POSIX_PATH_MAX
17 #elif defined (_MAX_PATH)              /* Win32 */
18 #define LC_PATH_MAX _MAX_PATH
19 #elif defined (PATH_MAX)               /* X Windows */
20 #define LC_PATH_MAX PATH_MAX
21 #else
22 #define LC_PATH_MAX 4096
23 #endif
24 
25 extern char colour_pal_file[LC_PATH_MAX];
26 extern char opening_pic[LC_PATH_MAX];
27 extern char graphic_path[LC_PATH_MAX];
28 extern char fontfile[LC_PATH_MAX];
29 extern char opening_path[LC_PATH_MAX];
30 extern char help_path[LC_PATH_MAX];
31 extern char message_path[LC_PATH_MAX];
32 extern char lc_textdomain_directory[LC_PATH_MAX];
33 extern char lincityrc_file[LC_PATH_MAX];
34 extern char given_scene[LC_PATH_MAX];
35 
36 void gunzip_file (char *f1, char *f2);
37 int file_exists (char *filename);
38 int directory_exists (char *dir);
39 char* load_graphic(char *s);
40 void undosify_string(char *s);
41 void load_lincityrc (void);
42 void save_lincityrc (void);
43 
44 void debug_printf (char* fmt, ...);
45 
46 #endif	/* __fileutil_h__ */
47