mirror of
https://github.com/open-simh/simtools.git
synced 2026-02-07 16:52:28 +00:00
Many style/formatting edits. Bug fixes. Reverted some previous changes temporarily while reviewing new code. Merged Baker's "virtual device" in a simpler form. ODS2 will assign a sensible drive name when mounting /image (== /virtual). If a specific drive name is desired, mount /image drivename=filespec. Files can be quoted, or use set qualifier_style unix if slashes are a problem. Note that mount on the command line allows tab completion. Moved "statistics" command into show. Coded support for import/binary (fixed records, 512 bytes). Converted fgets to fgetline Added show devices for Unix (limited by standard APIs) Got rid of separate ODS2-Image build.
33 lines
637 B
C
33 lines
637 B
C
#ifndef COMPAT_H
|
|
#define COMPAT_H
|
|
|
|
#if defined(_MSC_VER) && _MSC_VER < 1900
|
|
|
|
#define snprintf c99_snprintf
|
|
#define vsnprintf c99_vsnprintf
|
|
|
|
#include <stdarg.h>
|
|
|
|
int c99_vsnprintf(char *outBuf, size_t size, const char *format, va_list ap);
|
|
int c99_snprintf(char *outBuf, size_t size, const char *format, ...);
|
|
|
|
#endif
|
|
|
|
#ifdef _MSC_VER
|
|
FILE *openf( const char *filename, const char *mode );
|
|
#else
|
|
#define openf fopen
|
|
#endif
|
|
|
|
#ifdef _WIN32
|
|
#include <stdarg.h>
|
|
#include <windows.h>
|
|
|
|
TCHAR *w32_errstr( DWORD eno, ... );
|
|
char *driveFromLetter( const char *letter );
|
|
#endif
|
|
|
|
#define UNUSED(x) (void)(x)
|
|
|
|
#endif
|