aboutsummaryrefslogtreecommitdiff
path: root/nls.h
diff options
context:
space:
mode:
authorEduardo Casino <mail@eduardocasino.es>2022-05-24 07:58:48 +0200
committerJavier <dev.git@javispedro.com>2022-06-12 17:13:03 +0200
commit80f0debf2032e16629cb13682b8fb9ceccde423c (patch)
tree401b662542df92e1d4e8527a73e21531850ce109 /nls.h
parenta56c45b42d5d1bf3b161d051fbe879454856b2ff (diff)
downloadvbados-80f0debf2032e16629cb13682b8fb9ceccde423c.tar.gz
vbados-80f0debf2032e16629cb13682b8fb9ceccde423c.zip
Add support for hash-generated short file names
Diffstat (limited to 'nls.h')
-rw-r--r--nls.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/nls.h b/nls.h
index 9699bb1..124b703 100644
--- a/nls.h
+++ b/nls.h
@@ -50,14 +50,21 @@ static unsigned char nls_toupper( unsigned char c )
return ( c < 0x80 ? c : data.file_upper_case[c - 0x80] );
}
-static inline void nls_uppercase(SHFLSTRING *str)
+static inline bool nls_uppercase(SHFLSTRING *str)
{
int i;
+ bool upper_case = true;
for (i= 0; i < str->u16Length; ++i)
{
- str->ach[i] = nls_toupper(str->ach[i]);
+ unsigned char upper = nls_toupper(str->ach[i]);
+ if (upper != str->ach[i]) {
+ str->ach[i] = upper;
+ upper_case = false;
+ }
}
+
+ return upper_case;
}
static inline bool valid_8_3_file_chars(char __far *fname )