aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2022-06-12 19:06:31 +0200
committerJavier <dev.git@javispedro.com>2022-06-12 19:06:31 +0200
commitfbf3eb7918b1dc015023708eb6d32e65934a1128 (patch)
tree13f6113bc54c076eb0cae6a523c0a933c6889fa9
parent367db359784ef6a1c9f904e91e51ef61af4a92e9 (diff)
downloadvbados-fbf3eb7918b1dc015023708eb6d32e65934a1128.tar.gz
vbados-fbf3eb7918b1dc015023708eb6d32e65934a1128.zip
define IN_TSR macro in all tsr files
-rw-r--r--lfn.h4
-rw-r--r--makefile2
-rw-r--r--sftsr.c1
-rw-r--r--unicode.h2
4 files changed, 4 insertions, 5 deletions
diff --git a/lfn.h b/lfn.h
index df4d421..d9401b7 100644
--- a/lfn.h
+++ b/lfn.h
@@ -31,7 +31,7 @@
#define MIN_HASH_CHARS 2
#define MAX_HASH_CHARS 6
-#ifdef __IN_SFTSR__
+#ifdef IN_TSR
static inline bool translate_filename_from_host(SHFLSTRING *, bool, bool);
static bool matches_8_3_wildcard(const char __far *, const char __far *);
@@ -438,5 +438,5 @@ static inline uint16_t get_true_host_name(SHFLROOT root, TSRDATAPTR data, uint8_
return get_true_host_name_n(root, data, dst, src, buflen, buflen);
}
-#endif // __IN_SFTSR__
+#endif // IN_TSR
#endif // LFN_H
diff --git a/makefile b/makefile
index 9f11660..7f947ce 100644
--- a/makefile
+++ b/makefile
@@ -13,7 +13,7 @@ doscflags = -bt=dos -ms -6 -osi -w3 -wcd=202
# -osi to optimize for size, put intrinsics inline (to avoid runtime calls)
# -w3 enables warnings
# -wcd=202 disables the unreferenced function warning (e.g., for inline functions in headers)
-dostsrcflags = -zu -s -g=RES_GROUP -nd=RES -nt=RES_TEXT -nc=RES_CODE
+dostsrcflags = -DIN_TSR -zu -s -g=RES_GROUP -nd=RES -nt=RES_TEXT -nc=RES_CODE
# -s to disable stack checks, since it inserts calls to the runtime from the TSR part
# -zu since ss != ds on the TSR
diff --git a/sftsr.c b/sftsr.c
index 34992b4..05e9f46 100644
--- a/sftsr.c
+++ b/sftsr.c
@@ -67,7 +67,6 @@ static SHFLSTRING_WITH_BUF(shflstr, SHFL_MAX_LEN);
/** Private buffer where we store VirtualBox-obtained dir entries. */
static SHFLDIRINFO_WITH_NAME_BUF(shfldirinfo, SHFL_MAX_LEN);
-#define __IN_SFTSR__ 1
#include "unicode.h"
#include "nls.h"
#include "lfn.h"
diff --git a/unicode.h b/unicode.h
index 730d549..2e24a75 100644
--- a/unicode.h
+++ b/unicode.h
@@ -24,7 +24,7 @@
#include "sftsr.h"
-#ifdef __IN_SFTSR__
+#ifdef IN_TSR
#define TSRDATAPTR PTSRDATA
#else
#define TSRDATAPTR LPTSRDATA