Lines Matching refs: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 */
472 static uint16_t getExtName(uint32_t code, char *buffer, uint16_t bufferLength) {
473 const char *catname = getCharCatName(code);
484 for (cp = code, ndigits = 0; cp; ++ndigits, cp >>= 4)
488 for (cp = code, i = ndigits; (cp || i > 0) && bufferLength; cp >>= 4, bufferLength--) {
501 * Unicode code point "code".
502 * The return value is always a valid Group* that may contain "code"
503 * or else is the highest group before "code".
504 * If the lowest group is after "code", then that one is returned.
507 getGroup(UCharNames *names, uint32_t code) {
509 uint16_t groupMSB=(uint16_t)(code>>GROUP_SHIFT),
514 /* binary search for the group of names that contains the one for code */
602 getName(UCharNames *names, uint32_t code, UCharNameChoice nameChoice,
604 const uint16_t *group=getGroup(names, code);
605 if((uint16_t)(code>>GROUP_SHIFT)==group[GROUP_MSB]) {
606 return expandGroupName(names, group, (uint16_t)(code&GROUP_MASK), nameChoice,
652 ((FindName *)context)->code=start;
787 uint32_t code,
805 indexes[i]=(uint16_t)(code%factor);
806 code/=factor;
809 * we don't need to calculate the last modulus because start<=code<=end
810 * guarantees here that code<=factors[0]
812 indexes[0]=(uint16_t)code;
864 getAlgName(AlgorithmicRange *range, uint32_t code, UCharNameChoice nameChoice,
895 /* write hexadecimal code point value */
905 c=(char)(code&0xf);
913 code>>=4;
933 s, code-range->start, indexes, NULL, NULL, buffer, bufferLength);
1091 * returns the code point for a name if it fits into the range.
1096 UChar32 code;
1117 /* read hexadecimal code point value */
1119 code=0;
1123 code=(code<<4)|(c-'0');
1125 code=(code<<4)|(c-'A'+10);
1132 if(*otherName==0 && range->start<=(uint32_t)code && (uint32_t)code<=range->end) {
1133 return code;
1303 * 6 for most hex digits per code point
1463 u_charName(UChar32 code, UCharNameChoice nameChoice,
1481 if((uint32_t)code>UCHAR_MAX_VALUE || !isDataLoaded(pErrorCode)) {
1492 if(algRange->start<=(uint32_t)code && (uint32_t)code<=algRange->end) {
1493 length=getAlgName(algRange, (uint32_t)code, nameChoice, buffer, (uint16_t)bufferLength);
1502 length = getName(uCharNames, (uint32_t )code, U_EXTENDED_CHAR_NAME, buffer, (uint16_t) bufferLength);
1505 length = getExtName((uint32_t) code, buffer, (uint16_t) bufferLength);
1509 length=getName(uCharNames, (uint32_t)code, nameChoice, buffer, (uint16_t)bufferLength);
1639 findName.code=error;
1641 if (findName.code == error) {
1644 return findName.code;