Translate Characters
Translate characters during text comparisions.
- Declare ignore text field (translate)
-
Field declaration
- Segment Source
-
112: char *translate; /* Translation applied to characters. */
- Translate text
Segment Element
Variable declaration
-
991: register unsigned char *translate;
Segment Element
Code insertion
-
999: translate = (unsigned char *) key->translate;
- Dispatch ignored and translated compare
- Notes
-
This code only applies if both IgnoreText and TransText
concerns are included.
The body of IgnoreText will provide the definition for
the CMP_WITH_IGNORE() macro.
Segment Element
Code insertion
-
1090: else if (ignore && translate)
Segment Element
Code insertion
-
1139: CMP_WITH_IGNORE (translate[UCHAR (*texta)], translate[UCHAR (*textb)]);
- Dispatch translated compare
-
Code insertion
- Segment Source
-
1142: else if (translate)
1143: while (texta < lima && textb < limb)
1144: {
1145: if (translate[UCHAR (*texta++)] != translate[UCHAR (*textb++)])
1146: {
1147: diff = (translate[UCHAR (*--texta)]
1148: - translate[UCHAR (*--textb)]);
1149: break;
1150: }
1151: }
- Establish global sort options
-
Code insertion
- Segment Source
- 1772: gkey.translate = NULL;
- Propogate global sort options
Segment Element
Code modification
-
2031: if (!key->ignore && !key->translate && !key->skipsblanks && !key->reverse
Segment Element
Code insertion
-
2036: key->translate = gkey.translate;
Segment Element
Code modification
-
2045: if (!keyhead.next && (gkey.ignore || gkey.translate || gkey.skipsblanks