diff options
author | Eduardo Casino <mail@eduardocasino.es> | 2022-05-24 07:58:48 +0200 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2022-06-12 17:13:03 +0200 |
commit | 80f0debf2032e16629cb13682b8fb9ceccde423c (patch) | |
tree | 401b662542df92e1d4e8527a73e21531850ce109 /nls.h | |
parent | a56c45b42d5d1bf3b161d051fbe879454856b2ff (diff) | |
download | vbados-80f0debf2032e16629cb13682b8fb9ceccde423c.tar.gz vbados-80f0debf2032e16629cb13682b8fb9ceccde423c.zip |
Add support for hash-generated short file names
Diffstat (limited to 'nls.h')
-rw-r--r-- | nls.h | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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 ) |