Advanced Strategic Command
unix/fileio.h
Go to the documentation of this file.
1 // $Id: fileio.h,v 1.11 2009-04-18 13:48:40 mbickel Exp $
2 //
3 // $Log: not supported by cvs2svn $
4 // Revision 1.10 2007/04/13 16:16:15 mbickel
5 // Merged ASC2 branch
6 //
7 // Revision 1.8.2.1 2006/07/08 17:00:14 mbickel
8 // Merged updates from trunk
9 // Fixed replay problems
10 // Restructuring
11 //
12 // Revision 1.9 2006/04/25 18:04:11 mbickel
13 // Fixed compilation problems
14 //
15 // Revision 1.8 2003/11/18 18:29:23 mbickel
16 // Fixed unix compilation problems
17 //
18 // Revision 1.7 2002/10/19 16:42:05 mbickel
19 // Fixes to the build system
20 //
21 // Revision 1.6 2002/01/29 20:42:16 mbickel
22 // Improved finding of files with relative path
23 // Added wildcards to music playlist files
24 //
25 // Revision 1.5 2001/10/11 10:41:06 mbickel
26 // Restructured platform fileio handling
27 // Added map archival information to mapeditor
28 //
29 // Revision 1.4 2001/05/18 22:30:30 mbickel
30 // The data file is now installed in the correct directory
31 // If the installation directory is changed with configure, the new path
32 // will now be compiled directly into ASC
33 //
34 // Revision 1.3 2001/02/26 21:14:32 mbickel
35 // Added two small editors to the linux makefiles
36 // Added some more truecolor hacks to the graphics engine
37 //
38 // Revision 1.2 2000/10/12 21:37:57 mbickel
39 // Further restructured platform dependant routines
40 //
41 // Revision 1.1 2000/10/12 20:21:43 mbickel
42 // Restructuring operating system dependant files
43 //
44 //
45 /*
46  This file is part of Advanced Strategic Command; http://www.asc-hq.de
47  Copyright (C) 1994-2010 Martin Bickel and Marc Schellenberger
48 
49  This program is free software; you can redistribute it and/or modify
50  it under the terms of the GNU General Public License as published by
51  the Free Software Foundation; either version 2 of the License, or
52  (at your option) any later version.
53 
54  This program is distributed in the hope that it will be useful,
55  but WITHOUT ANY WARRANTY; without even the implied warranty of
56  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
57  GNU General Public License for more details.
58 
59  You should have received a copy of the GNU General Public License
60  along with this program; see the file COPYING. If not, write to the
61  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
62  Boston, MA 02111-1307 USA
63 */
64 
65 // this file takes care that the necessary header files for opendir / readdir
66 // are being included in basestrm.cpp
67 
68 #ifndef fileio_h_included
69  #define fileio_h_included
70 
71  #ifdef HAVE_SYS_DIRENT_H
72  #include <sys/dirent.h>
73  #endif
74 
75  #if HAVE_DIRENT_H
76  # include <dirent.h>
77  # define NAMLEN(dirent) strlen((dirent)->d_name)
78  #else
79  # define dirent direct
80  # define NAMLEN(dirent) (dirent)->d_namlen
81  # if HAVE_SYS_NDIR_H
82  # include <sys/ndir.h>
83  # endif
84  # if HAVE_SYS_DIR_H
85  # include <sys/dir.h>
86  # endif
87  # if HAVE_NDIR_H
88  # include <ndir.h>
89  # endif
90  #endif
91  #define ASC_direct dirent
92 
93  #include <unistd.h>
94 
95 extern const char* filereadmode;
96 extern const char* filewritemode;
97 extern const char* filereadmodetext;
98 extern const char* filewritemodetext;
99 extern const char pathdelimitter;
100 extern const char* pathdelimitterstring;
101 extern const char foreignPathDelimitter;
102 extern const char* foreignPathDelimitterString;
103 extern const bool has_drive_letters;
104 
105 extern const int maxfilenamelength;
106 extern const char* asc_configurationfile;
107 
108 #endif
const char * filereadmode
Definition: unix/fileio.cpp:19
const char * foreignPathDelimitterString
Definition: unix/fileio.cpp:26
const char * asc_configurationfile
Definition: unix/fileio.cpp:29
const char * filewritemode
Definition: unix/fileio.cpp:20
const char foreignPathDelimitter
Definition: unix/fileio.cpp:25
const int maxfilenamelength
Definition: unix/fileio.cpp:28
const bool has_drive_letters
Definition: unix/fileio.cpp:30
const char * filewritemodetext
Definition: unix/fileio.cpp:22
const char * pathdelimitterstring
Definition: unix/fileio.cpp:24
const char * filereadmodetext
Definition: unix/fileio.cpp:21
const char pathdelimitter
Definition: unix/fileio.cpp:23