[latex3-commits] [git/LaTeX3-latex3-latex3] master: Prep work for 8-bit Greek case changing (ef3d80a9f)

Joseph Wright joseph.wright at morningstar2.co.uk
Tue Oct 27 14:34:40 CET 2020


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/ef3d80a9f44f2d3983c90b99c829e90bb6c496d6

>---------------------------------------------------------------

commit ef3d80a9f44f2d3983c90b99c829e90bb6c496d6
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Tue Oct 27 13:34:40 2020 +0000

    Prep work for 8-bit Greek case changing
    
    We will use the same tests for chars in all engines:
    that means doing some UTF-8 calcs but is otherwise
    best to have a single algorithm.


>---------------------------------------------------------------

ef3d80a9f44f2d3983c90b99c829e90bb6c496d6
 l3kernel/l3text-case.dtx | 122 +++++++++++++++++++++++------------------------
 1 file changed, 61 insertions(+), 61 deletions(-)

diff --git a/l3kernel/l3text-case.dtx b/l3kernel/l3text-case.dtx
index c6c89afd8..fd41c6bdd 100644
--- a/l3kernel/l3text-case.dtx
+++ b/l3kernel/l3text-case.dtx
@@ -912,106 +912,106 @@
           { \@@_change_case_loop:nnw {#1} {#2} #3 }
           { \@@_change_case_upper_el_gobble:nnw {#1} {#2} }
       }
+  }
 %    \end{macrocode}
 %   Luckily the Greek range is limited and clear.
 %    \begin{macrocode}
-    \prg_new_conditional:Npnn \@@_change_case_if_greek:n #1 { TF }
-      {
-        \if_int_compare:w #1 < "0370 \exp_stop_f:
+\prg_new_conditional:Npnn \@@_change_case_if_greek:n #1 { TF }
+  {
+    \if_int_compare:w #1 < "0370 \exp_stop_f:
+      \prg_return_false:
+    \else:
+      \if_int_compare:w #1 > "03FF \exp_stop_f:
+        \if_int_compare:w #1 < "1F00 \exp_stop_f:
           \prg_return_false:
         \else:
-          \if_int_compare:w #1 > "03FF \exp_stop_f:
-            \if_int_compare:w #1 < "1F00 \exp_stop_f:
-              \prg_return_false:
-            \else:
-              \if_int_compare:w #1 > "1FFF \exp_stop_f:
-                \prg_return_false:
-              \else:
-                \prg_return_true:
-              \fi:
-            \fi:
+          \if_int_compare:w #1 > "1FFF \exp_stop_f:
+            \prg_return_false:
           \else:
             \prg_return_true:
           \fi:
         \fi:
-      }
+      \else:
+        \prg_return_true:
+      \fi:
+    \fi:
+  }
 %    \end{macrocode}
 %   We follow ICU in adding a few extras to the accent list here.
 %    \begin{macrocode}
-    \prg_new_conditional:Npnn \@@_change_case_if_greek_accent:n #1 { TF , p }
-      {
-        \if_int_compare:w #1 = "0300 \exp_stop_f:
+\prg_new_conditional:Npnn \@@_change_case_if_greek_accent:n #1 { TF , p }
+  {
+    \if_int_compare:w #1 = "0300 \exp_stop_f:
+      \prg_return_true:
+    \else:
+      \if_int_compare:w #1 = "0301 \exp_stop_f:
+        \prg_return_true:
+      \else:
+        \if_int_compare:w #1 = "0342 \exp_stop_f:
           \prg_return_true:
         \else:
-          \if_int_compare:w #1 = "0301 \exp_stop_f:
+          \if_int_compare:w #1 = "0302 \exp_stop_f:
             \prg_return_true:
           \else:
-            \if_int_compare:w #1 = "0342 \exp_stop_f:
+            \if_int_compare:w #1 = "0303 \exp_stop_f:
               \prg_return_true:
             \else:
-              \if_int_compare:w #1 = "0302 \exp_stop_f:
+              \if_int_compare:w #1 = "0311 \exp_stop_f:
                 \prg_return_true:
               \else:
-                \if_int_compare:w #1 = "0303 \exp_stop_f:
-                  \prg_return_true:
-                \else:
-                  \if_int_compare:w #1 = "0311 \exp_stop_f:
-                    \prg_return_true:
-                  \else:
-                    \prg_return_false:
-                  \fi:
-                \fi:
+                \prg_return_false:
               \fi:
             \fi:
           \fi:
         \fi:
-      }
-    \prg_new_conditional:Npnn \@@_change_case_if_greek_diacritic:n
-      #1 { TF , p }
-      {
-        \if_int_compare:w #1 = "0304 \exp_stop_f:
+      \fi:
+    \fi:
+  }
+\prg_new_conditional:Npnn \@@_change_case_if_greek_diacritic:n
+  #1 { TF , p }
+  {
+    \if_int_compare:w #1 = "0304 \exp_stop_f:
+      \prg_return_true:
+    \else:
+      \if_int_compare:w #1 = "0306 \exp_stop_f:
+        \prg_return_true:
+      \else:
+        \if_int_compare:w #1 = "0313 \exp_stop_f:
           \prg_return_true:
         \else:
-          \if_int_compare:w #1 = "0306 \exp_stop_f:
+          \if_int_compare:w #1 = "0314 \exp_stop_f:
             \prg_return_true:
           \else:
-            \if_int_compare:w #1 = "0313 \exp_stop_f:
+            \if_int_compare:w #1 = "0343 \exp_stop_f:
               \prg_return_true:
             \else:
-              \if_int_compare:w #1 = "0314 \exp_stop_f:
-                \prg_return_true:
-              \else:
-                \if_int_compare:w #1 = "0343 \exp_stop_f:
-                  \prg_return_true:
-                \else:
-                  \prg_return_false:
-                \fi:
-              \fi:
+              \prg_return_false:
             \fi:
           \fi:
         \fi:
-      }
-    \prg_new_conditional:Npnn \@@_change_case_if_takes_dialytika:n #1 { TF }
-      {
-        \if_int_compare:w #1 = "0399 \exp_stop_f:
+      \fi:
+    \fi:
+  }
+\prg_new_conditional:Npnn \@@_change_case_if_takes_dialytika:n #1 { TF }
+  {
+    \if_int_compare:w #1 = "0399 \exp_stop_f:
+      \prg_return_true:
+    \else:
+      \if_int_compare:w #1 = "03B9 \exp_stop_f:
+        \prg_return_true:
+      \else:
+        \if_int_compare:w #1 = "03A5 \exp_stop_f:
           \prg_return_true:
         \else:
-          \if_int_compare:w #1 = "03B9 \exp_stop_f:
+          \if_int_compare:w #1 = "03C5 \exp_stop_f:
             \prg_return_true:
           \else:
-            \if_int_compare:w #1 = "03A5 \exp_stop_f:
-              \prg_return_true:
-            \else:
-              \if_int_compare:w #1 = "03C5 \exp_stop_f:
-                \prg_return_true:
-              \else:
-                \prg_return_false:
-              \fi:
-            \fi:
+            \prg_return_false:
           \fi:
         \fi:
-       }
-  }
+      \fi:
+    \fi:
+   }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}





More information about the latex3-commits mailing list.