mirror of
https://github.com/open-simh/simtools.git
synced 2026-02-25 08:21:19 +00:00
Fix various compiler warnings. Fix bug causing double free when a file isn't found. Fix bug using uninitialized variable parsing null filename. Fix bug causing crash when format 3 retrieval pointer encountered. Add support for readline (command line editing and history on Unix) Untangle NT I/O so it builds without the direct access SCSI API & works. Report errors as text messages everywhere. Add MSVC project files. Implement most of dir/full Partially implement XABITM Add help to command tables. Allow choice of VMS qualifiers or Unix options. mount /write // /dev/cdrom or mount -write /dev/cdrom Parse quoted strings as command parameters. Mount /write "/dev/cdrom" search [*...]*.txt "My words for you" Resolve command, parameter & qualifier ambiguity from tables. Consolidate the various makefiles into a common file with very small platform-specific wrappers. This simplifies maintenance. Add diskio module to allow easy access to .iso images and simulator files. Removes requirement for loop device or equivalent. Builds as a separate executable. Writes to the ODS2 volumes are broken.
31 lines
537 B
C
31 lines
537 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 _WIN32
|
|
#include <stdio.h>
|
|
#include <windows.h>
|
|
|
|
FILE *openf( const char *filename, const char *mode );
|
|
|
|
TCHAR *w32_errstr( DWORD eno, ... );
|
|
|
|
#else
|
|
#define openf fopen
|
|
#endif
|
|
|
|
#define UNUSED(x) (void)(x)
|
|
|
|
#endif
|