From 3f12d8917c568d9daf22206d5513c3dd49600cee Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Mon, 19 Jul 2021 09:37:18 -0600 Subject: [PATCH] Add casecmp source information --- src/header/wctype/casecmp.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/header/wctype/casecmp.rs b/src/header/wctype/casecmp.rs index a15e9292f6..bea9e58ad4 100644 --- a/src/header/wctype/casecmp.rs +++ b/src/header/wctype/casecmp.rs @@ -1,4 +1,9 @@ +// From musl src/ctype/casemap.h +// Licensed under the MIT license +// Copyright 2005-2020 Rich Felker, et al. + use crate::platform::types::*; + const tab: [c_uchar; 2666] = [ 7, 8, 9, 10, 11, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 13, 6, 6, 14, 6, 6, 6, 6, 6, 6, 6, 6, 15, 16, 17, 18, 6, 19, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 20, 21, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, @@ -100,6 +105,7 @@ const tab: [c_uchar; 2666] = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ]; + const rules: [c_int; 240] = [ 0x0, 0x2001, -0x2000, 0x1dbf00, 0x2e700, 0x7900, 0x2402, 0x101, -0x100, 0x0, 0x201, -0x200, -0xc6ff, -0xe800, -0x78ff, -0x12c00, 0xc300, 0xd201, 0xce01, 0xcd01, 0x4f01, 0xca01, 0xcb01, @@ -125,6 +131,7 @@ const rules: [c_int; 240] = [ -0x2000, 0x0, 0x2801, -0x2800, 0x0, 0x4001, -0x4000, 0x0, 0x2001, -0x2000, 0x0, 0x2001, -0x2000, 0x0, 0x2201, -0x2200, ]; + const rulebases: [c_uchar; 512] = [ 0, 6, 39, 81, 111, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 124, 0, 0, 127, 0, 0, 0, 0, 0, 0, 0, 0, 131, 142, 146, 151, 0, 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 180, 196, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -144,6 +151,7 @@ const rulebases: [c_uchar; 512] = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 237, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ]; + const exceptions: [[c_uchar; 2]; 200] = [ [48, 12], [49, 13],