Lines Matching defs:group
46 * The Group struct was padded to 8 bytes on compilers for early ARM CPUs,
47 * which broke the assumption that sizeof(Group)==6 and that the ++ operator
57 } Group;
67 * Get the 32-bit group offset.
68 * @param group (const uint16_t *) pointer to a Group triple of uint16_t
69 * @return group offset (int32_t)
71 #define GET_GROUP_OFFSET(group) ((int32_t)(group)[GROUP_OFFSET_HIGH]<<16|(group)[GROUP_OFFSET_LOW])
73 #define NEXT_GROUP(group) ((group)+GROUP_LENGTH)
74 #define PREV_GROUP(group) ((group)-GROUP_LENGTH)
89 * groupCount groups. Each group is a triple of uint16_t, see GROUP_LENGTH
90 * and the comment for the old struct Group above.
474 * getGroup() does a binary search for the group that contains the
476 * The return value is always a valid Group* that may contain "code"
477 * or else is the highest group before "code".
478 * If the lowest group is after "code", then that one is returned.
488 /* binary search for the group of names that contains the one for code */
515 /* read the lengths of the 32 strings in this group and get each string's offset */
519 /* all 32 lengths must be read to get the offset of the first group string */
560 /* now, s is at the first group string */
565 expandGroupName(UCharNames *names, const uint16_t *group,
569 const uint8_t *s=(uint8_t *)names+names->groupStringOffset+GET_GROUP_OFFSET(group);
578 const uint16_t *group=getGroup(names, code);
579 if((uint16_t)(code>>GROUP_SHIFT)==group[GROUP_MSB]) {
580 return expandGroupName(names, group, (uint16_t)(code&GROUP_MASK), nameChoice,
583 /* group not found */
593 * enumGroupNames() enumerates all the names in a 32-group
597 enumGroupNames(UCharNames *names, const uint16_t *group,
602 const uint8_t *s=(uint8_t *)names+names->groupStringOffset+GET_GROUP_OFFSET(group);
670 const uint16_t *group, *groupLimit;
675 /* find the group that contains start, or the highest before it */
676 group=getGroup(names, start);
678 if(startGroupMSB<group[GROUP_MSB] && nameChoice==U_EXTENDED_CHAR_NAME) {
679 /* enumerate synthetic names between start and the group start */
680 UChar32 extLimit=((UChar32)group[GROUP_MSB]<<GROUP_SHIFT);
691 if(startGroupMSB==group[GROUP_MSB]) {
692 /* if start and limit-1 are in the same group, then enumerate only in that one */
693 return enumGroupNames(names, group, start, limit-1, fn, context, nameChoice);
700 if(startGroupMSB==group[GROUP_MSB]) {
701 /* enumerate characters in the partial start group */
703 if(!enumGroupNames(names, group,
708 group=NEXT_GROUP(group); /* continue with the next group */
710 } else if(startGroupMSB>group[GROUP_MSB]) {
711 /* make sure that we start enumerating with the first group after start */
712 const uint16_t *nextGroup=NEXT_GROUP(group);
722 group=nextGroup;
726 while(group<groupLimit && group[GROUP_MSB]<endGroupMSB) {
728 start=(UChar32)group[GROUP_MSB]<<GROUP_SHIFT;
729 if(!enumGroupNames(names, group, start, start+LINES_PER_GROUP-1, fn, context, nameChoice)) {
732 nextGroup=NEXT_GROUP(group);
733 if (nextGroup < groupLimit && nextGroup[GROUP_MSB] > group[GROUP_MSB] + 1 && nameChoice == U_EXTENDED_CHAR_NAME) {
738 if (!enumExtNames((group[GROUP_MSB] + 1) << GROUP_SHIFT, end - 1, fn, context)) {
742 group=nextGroup;
745 /* enumerate within the end group (group[GROUP_MSB]==endGroupMSB) */
746 if(group<groupLimit && group[GROUP_MSB]==endGroupMSB) {
747 return enumGroupNames(names, group, (limit-1)&~GROUP_MASK, limit-1, fn, context, nameChoice);
748 } else if (nameChoice == U_EXTENDED_CHAR_NAME && group == groupLimit) {
749 UChar32 next = (PREV_GROUP(group)[GROUP_MSB] + 1) << GROUP_SHIFT;
758 /* we have not found a group, which means everything is made of
1349 const uint16_t *group;
1359 group=GET_GROUPS(uCharNames);
1360 groupCount=*group++;
1364 s=(uint8_t *)uCharNames+uCharNames->groupStringOffset+GET_GROUP_OFFSET(group);
1367 /* enumerate all lines in each group */
1399 group=NEXT_GROUP(group);
1435 /* set sets and lengths from group names, set global maximum values */
1980 /* swap the group table */
1986 * swap the group strings
2011 count=offsets[31]+lengths[31]; /* total number of string bytes in this group */