[go: up one dir, main page]

File: fileutil.h

package info (click to toggle)
lincity 1.13.1-16
  • links: PTS
  • area: main
  • in suites: trixie
  • size: 7,296 kB
  • sloc: ansic: 32,746; sh: 8,578; makefile: 584; perl: 445; yacc: 316; sed: 16
file content (46 lines) | stat: -rw-r--r-- 1,462 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* ---------------------------------------------------------------------- *
 * fileutil.h
 * This file is part of lincity.
 * Lincity is copyright (c) I J Peters 1995-1997, (c) Greg Sharp 1997-2001.
 * ---------------------------------------------------------------------- */
#ifndef __fileutil_h__
#define __fileutil_h__

extern char *lc_save_dir;
extern char *lc_temp_file;
extern int lc_save_dir_len;
//extern int make_dir_ok_flag;

/* Try to find the maximum file name from OS */
#if defined (_POSIX_PATH_MAX)          /* Posix */
#define LC_PATH_MAX _POSIX_PATH_MAX
#elif defined (_MAX_PATH)              /* Win32 */
#define LC_PATH_MAX _MAX_PATH
#elif defined (PATH_MAX)               /* X Windows */
#define LC_PATH_MAX PATH_MAX
#else
#define LC_PATH_MAX 4096
#endif

extern char colour_pal_file[LC_PATH_MAX];
extern char opening_pic[LC_PATH_MAX];
extern char graphic_path[LC_PATH_MAX];
extern char fontfile[LC_PATH_MAX];
extern char opening_path[LC_PATH_MAX];
extern char help_path[LC_PATH_MAX];
extern char message_path[LC_PATH_MAX];
extern char lc_textdomain_directory[LC_PATH_MAX];
extern char lincityrc_file[LC_PATH_MAX];
extern char given_scene[LC_PATH_MAX];

void gunzip_file (char *f1, char *f2);
int file_exists (char *filename);
int directory_exists (char *dir);
char* load_graphic(char *s);
void undosify_string(char *s);
void load_lincityrc (void);
void save_lincityrc (void);

void debug_printf (char* fmt, ...);

#endif	/* __fileutil_h__ */