Lines Matching defs:code
48 * and we don't want to make it less compact, so we changed the access code.
96 UChar32 code;
200 /* check error code from previous attempt */
469 static uint16_t getExtName(uint32_t code, char *buffer, uint16_t bufferLength) {
470 const char *catname = getCharCatName(code);
481 for (cp = code, ndigits = 0; cp; ++ndigits, cp >>= 4)
485 for (cp = code, i = ndigits; (cp || i > 0) && bufferLength; cp >>= 4, bufferLength--) {
498 * Unicode code point "code".
499 * The return value is always a valid Group* that may contain "code"
500 * or else is the highest group before "code".
501 * If the lowest group is after "code", then that one is returned.
504 getGroup(UCharNames *names, uint32_t code) {
506 uint16_t groupMSB=(uint16_t)(code>>GROUP_SHIFT),
511 /* binary search for the group of names that contains the one for code */
599 getName(UCharNames *names, uint32_t code, UCharNameChoice nameChoice,
601 const uint16_t *group=getGroup(names, code);
602 if((uint16_t)(code>>GROUP_SHIFT)==group[GROUP_MSB]) {
603 return expandGroupName(names, group, (uint16_t)(code&GROUP_MASK), nameChoice,
649 ((FindName *)context)->code=start;
784 uint32_t code,
802 indexes[i]=(uint16_t)(code%factor);
803 code/=factor;
806 * we don't need to calculate the last modulus because start<=code<=end
807 * guarantees here that code<=factors[0]
809 indexes[0]=(uint16_t)code;
861 getAlgName(AlgorithmicRange *range, uint32_t code, UCharNameChoice nameChoice,
887 /* write hexadecimal code point value */
897 c=(char)(code&0xf);
905 code>>=4;
925 s, code-range->start, indexes, NULL, NULL, buffer, bufferLength);
1083 * returns the code point for a name if it fits into the range.
1088 UChar32 code;
1109 /* read hexadecimal code point value */
1111 code=0;
1115 code=(code<<4)|(c-'0');
1117 code=(code<<4)|(c-'A'+10);
1124 if(*otherName==0 && range->start<=(uint32_t)code && (uint32_t)code<=range->end) {
1125 return code;
1295 * 6 for most hex digits per code point
1455 u_charName(UChar32 code, UCharNameChoice nameChoice,
1473 if((uint32_t)code>UCHAR_MAX_VALUE || !isDataLoaded(pErrorCode)) {
1484 if(algRange->start<=(uint32_t)code && (uint32_t)code<=algRange->end) {
1485 length=getAlgName(algRange, (uint32_t)code, nameChoice, buffer, (uint16_t)bufferLength);
1494 length = getName(uCharNames, (uint32_t )code, U_EXTENDED_CHAR_NAME, buffer, (uint16_t) bufferLength);
1497 length = getExtName((uint32_t) code, buffer, (uint16_t) bufferLength);
1501 length=getName(uCharNames, (uint32_t)code, nameChoice, buffer, (uint16_t)bufferLength);
1631 findName.code=error;
1633 if (findName.code == error) {
1636 return findName.code;