From 7165ac1c4137190e0e0fa98b291681bc3b9ba055 Mon Sep 17 00:00:00 2001 From: bumbread Date: Wed, 22 Jun 2022 01:14:46 +1100 Subject: [PATCH] move wchar_t out of unicode data folder --- src/code/unicode/{unicode_compile.py => compile.py} | 4 ++-- src/code/unicode/{unicode_data.h => data.h} | 0 src/code/unicode/{unicode_data.txt => data.txt} | 0 src/code/unicode/readme | 8 ++++---- src/code/{unicode => }/wctype.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) rename src/code/unicode/{unicode_compile.py => compile.py} (94%) rename src/code/unicode/{unicode_data.h => data.h} (100%) rename src/code/unicode/{unicode_data.txt => data.txt} (100%) rename src/code/{unicode => }/wctype.c (98%) diff --git a/src/code/unicode/unicode_compile.py b/src/code/unicode/compile.py similarity index 94% rename from src/code/unicode/unicode_compile.py rename to src/code/unicode/compile.py index b69ce9d..e95406f 100644 --- a/src/code/unicode/unicode_compile.py +++ b/src/code/unicode/compile.py @@ -6,7 +6,7 @@ abspath = os.path.abspath(sys.argv[0]) dname = os.path.dirname(abspath) os.chdir(dname) -with open('unicode_data.h', 'w') as header: +with open('data.h', 'w') as header: header.write('\n'); header.write('#pragma once\n\n'); header.write('#define Cc 0\n'); @@ -48,7 +48,7 @@ struct _uni_elm { } uni_codepoints[] = { '''); - with open('unicode_data.txt') as file: + with open('data.txt') as file: for line in file: row = line.split(';') code = row[0].strip() diff --git a/src/code/unicode/unicode_data.h b/src/code/unicode/data.h similarity index 100% rename from src/code/unicode/unicode_data.h rename to src/code/unicode/data.h diff --git a/src/code/unicode/unicode_data.txt b/src/code/unicode/data.txt similarity index 100% rename from src/code/unicode/unicode_data.txt rename to src/code/unicode/data.txt diff --git a/src/code/unicode/readme b/src/code/unicode/readme index 1f23361..cb3a070 100644 --- a/src/code/unicode/readme +++ b/src/code/unicode/readme @@ -4,8 +4,8 @@ the file with Unicode data at: https://unicode.org/Public/UNIDATA/UnicodeData.txt -This file is placed into this directory by the name unicode_data.txt. To update -the unicode standard a new file is put under that name, then unicode_compile.py -is ran with python interpreter. It will generate a new unicode.h header file. +This file is placed into this directory by the name data.txt. To update the +unicode standard a new file is put under that name, then unicode_compile.py is +ran with python interpreter. It will generate a new unicode.h header file. -DO NOT MODIFY unicode.h DIRECTLY BRUH. +DO NOT MODIFY data.h DIRECTLY BRUH. diff --git a/src/code/unicode/wctype.c b/src/code/wctype.c similarity index 98% rename from src/code/unicode/wctype.c rename to src/code/wctype.c index a5e0e8e..d305fc1 100644 --- a/src/code/unicode/wctype.c +++ b/src/code/wctype.c @@ -2,7 +2,7 @@ #include #include -#include "unicode_data.h" +#include "unicode/data.h" static inline int char_cat(wint_t wc) { return uni_codepoints[wc].cat;