diff options
| author | Karl Heuer | 1997-05-15 07:35:32 +0000 |
|---|---|---|
| committer | Karl Heuer | 1997-05-15 07:35:32 +0000 |
| commit | e16696bacc4aa567d04fa725cc4c1f2913d6e2c7 (patch) | |
| tree | b19bb445b13506a826f3ee2a1d53328c79a5e0e4 /src | |
| parent | 37a44719526b4a38a828778bde5a632575e7b6e9 (diff) | |
| download | emacs-e16696bacc4aa567d04fa725cc4c1f2913d6e2c7.tar.gz emacs-e16696bacc4aa567d04fa725cc4c1f2913d6e2c7.zip | |
(compute_trt_identity, compute_trt_shuffle): Add comments.
Diffstat (limited to 'src')
| -rw-r--r-- | src/casetab.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/casetab.c b/src/casetab.c index adf871764f6..c5a4e7a0307 100644 --- a/src/casetab.c +++ b/src/casetab.c | |||
| @@ -170,6 +170,15 @@ set_case_table (table, standard) | |||
| 170 | return table; | 170 | return table; |
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | /* Using the scratch array at BYTES of which the first DEPTH elements | ||
| 174 | are already set, and using the multi-byte structure inherited from | ||
| 175 | TRT, make INVERSE be an identity mapping. That is, for each slot | ||
| 176 | that's indexed by a single byte, store that byte in INVERSE. | ||
| 177 | Where TRT has a subtable, make a corresponding subtable in INVERSE | ||
| 178 | and recursively initialize that subtable so that its elements are | ||
| 179 | the multi-byte characters that correspond to the index bytes. | ||
| 180 | This is the first step in generating an inverse mapping. */ | ||
| 181 | |||
| 173 | static void | 182 | static void |
| 174 | compute_trt_identity (bytes, depth, trt, inverse) | 183 | compute_trt_identity (bytes, depth, trt, inverse) |
| 175 | unsigned char *bytes; | 184 | unsigned char *bytes; |
| @@ -201,6 +210,12 @@ compute_trt_identity (bytes, depth, trt, inverse) | |||
| 201 | } | 210 | } |
| 202 | } | 211 | } |
| 203 | 212 | ||
| 213 | /* Using the scratch array at BYTES of which the first DEPTH elements | ||
| 214 | are already set, permute the elements of INVERSE (which is initially | ||
| 215 | an identity mapping) so that it has one cycle for each equivalence | ||
| 216 | class induced by the translation table TRT. IBASE is the lispy | ||
| 217 | version of the outermost (depth 0) instance of INVERSE. */ | ||
| 218 | |||
| 204 | static void | 219 | static void |
| 205 | compute_trt_shuffle (bytes, depth, ibase, trt, inverse) | 220 | compute_trt_shuffle (bytes, depth, ibase, trt, inverse) |
| 206 | unsigned char *bytes; | 221 | unsigned char *bytes; |