mirror of
https://github.com/simh/simh.git
synced 2026-04-27 20:38:04 +00:00
FIO: Add a global variable that indicates the normal host path separator
This avoids the potential need for platform specific #ifdef blocks in simulator code which might be needed on some platforms.
This commit is contained in:
@@ -81,6 +81,13 @@ t_bool sim_end; /* TRUE = little endian, FALSE = big endian
|
|||||||
t_bool sim_taddr_64; /* t_addr is > 32b and Large File Support available */
|
t_bool sim_taddr_64; /* t_addr is > 32b and Large File Support available */
|
||||||
t_bool sim_toffset_64; /* Large File (>2GB) file I/O Support available */
|
t_bool sim_toffset_64; /* Large File (>2GB) file I/O Support available */
|
||||||
|
|
||||||
|
const char sim_file_path_separator /* Platform specific value \ or / as appropriate */
|
||||||
|
#if defined (_WIN32)
|
||||||
|
= '\\';
|
||||||
|
#else
|
||||||
|
= '/';
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(fprintf) /* Make sure to only use the C rtl stream I/O routines */
|
#if defined(fprintf) /* Make sure to only use the C rtl stream I/O routines */
|
||||||
#undef fprintf
|
#undef fprintf
|
||||||
#undef fputs
|
#undef fputs
|
||||||
|
|||||||
@@ -117,6 +117,8 @@ extern t_bool sim_taddr_64; /* t_addr is > 32b and Large File Support av
|
|||||||
extern t_bool sim_toffset_64; /* Large File (>2GB) file I/O support */
|
extern t_bool sim_toffset_64; /* Large File (>2GB) file I/O support */
|
||||||
extern t_bool sim_end; /* TRUE = little endian, FALSE = big endian */
|
extern t_bool sim_end; /* TRUE = little endian, FALSE = big endian */
|
||||||
|
|
||||||
|
extern const char sim_file_path_separator; /* Platform specific value \ or / as appropriate */
|
||||||
|
|
||||||
char *sim_trim_endspc (char *cptr);
|
char *sim_trim_endspc (char *cptr);
|
||||||
int sim_isspace (int c);
|
int sim_isspace (int c);
|
||||||
#ifdef isspace
|
#ifdef isspace
|
||||||
|
|||||||
Reference in New Issue
Block a user