Mercurial > emacs
changeset 17815:c407a3aca56f
(compute_trt_identity, compute_trt_shuffle): Add comments.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Thu, 15 May 1997 07:35:32 +0000 |
parents | 56a59138fa6c |
children | 380442ed6a1c |
files | src/casetab.c |
diffstat | 1 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/casetab.c Thu May 15 05:18:28 1997 +0000 +++ b/src/casetab.c Thu May 15 07:35:32 1997 +0000 @@ -170,6 +170,15 @@ return table; } +/* Using the scratch array at BYTES of which the first DEPTH elements + are already set, and using the multi-byte structure inherited from + TRT, make INVERSE be an identity mapping. That is, for each slot + that's indexed by a single byte, store that byte in INVERSE. + Where TRT has a subtable, make a corresponding subtable in INVERSE + and recursively initialize that subtable so that its elements are + the multi-byte characters that correspond to the index bytes. + This is the first step in generating an inverse mapping. */ + static void compute_trt_identity (bytes, depth, trt, inverse) unsigned char *bytes; @@ -201,6 +210,12 @@ } } +/* Using the scratch array at BYTES of which the first DEPTH elements + are already set, permute the elements of INVERSE (which is initially + an identity mapping) so that it has one cycle for each equivalence + class induced by the translation table TRT. IBASE is the lispy + version of the outermost (depth 0) instance of INVERSE. */ + static void compute_trt_shuffle (bytes, depth, ibase, trt, inverse) unsigned char *bytes;