tinymux/utf/build_win.cmd
Stephen Dennis 6dd485457f Implement NFC normalization with DFA-based Unicode property lookups
Add utf8_normalize_nfc() and utf8_is_nfc() — complete NFC normalization
using four DFA state machines for all Unicode property lookups:

- CCC (Canonical Combining Class): integer DFA, 132 states, 3.5 KB
- NFC_QC (Quick Check): integer DFA, 60 states, 1 KB
- NFD (Canonical Decomposition): string DFA, 97 states, 6.4 KB
- NFC Composition Pairs: pair DFA, 1010 states, 19 KB

The algorithm follows UAX #15: decompose to NFD, canonically reorder
combining marks by CCC, then compose pairs back into precomposed forms.
Hangul (Korean) composition and decomposition are handled algorithmically
for full coverage of all 11,172 syllables.

Quick check (utf8_is_nfc) short-circuits when the string is already NFC,
which is the common case for existing TinyMUX data.

All tables regenerated with the four new NFC tables appended. Locale-
independent per Unicode default algorithms — correct for a multi-user
server where players may have different locales.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 09:03:15 -07:00

20 lines
808 B
Batchfile

@echo off
call "C:\Program Files\Microsoft Visual Studio\18\Professional\VC\Auxiliary\Build\vcvars64.bat" >NUL 2>&1
cd /d "%~dp0"
copy /Y autoconf_win.h autoconf.h >NUL
echo Building buildFiles.exe...
cl /EHsc /O2 /Fe:buildFiles.exe buildFiles.cpp smutil.cpp
if errorlevel 1 exit /b 1
echo Building classify.exe...
cl /EHsc /O2 /Fe:classify.exe classify.cpp ConvertUTF.cpp smutil.cpp
if errorlevel 1 exit /b 1
echo Building integers.exe...
cl /EHsc /O2 /Fe:integers.exe integers.cpp ConvertUTF.cpp smutil.cpp
if errorlevel 1 exit /b 1
echo Building strings.exe...
cl /EHsc /O2 /Fe:strings.exe strings.cpp ConvertUTF.cpp smutil.cpp
if errorlevel 1 exit /b 1
echo Building pairs.exe...
cl /EHsc /O2 /Fe:pairs.exe pairs.cpp ConvertUTF.cpp smutil.cpp
if errorlevel 1 exit /b 1
echo All tools built successfully.