Home | History | Annotate | Download | only in toolutil

Lines Matching refs:items

395     items=NULL;
426 if(items[idx].isDataOwned) {
427 free(items[idx].data);
431 uprv_free((void*)items);
531 fprintf(stderr, "icupkg: too many items, maximum is %d\n", itemMax);
558 memset(items, 0, itemCount*sizeof(Item));
565 * Get the common prefix of the items.
598 items[i].name=s+prefixLength;
601 items[i].data=(uint8_t *)inBytes+ds->readUInt32(inEntries[i].dataOffset);
603 items[i-1].length=(int32_t)(items[i].data-items[i-1].data);
606 typeEnum=getTypeEnumForInputData(items[i-1].data, items[i-1].length, &errorCode);
608 fprintf(stderr, "icupkg: not an ICU data file: item \"%s\" in \"%s\"\n", items[i-1].name, filename);
611 items[i-1].type=makeTypeLetter(typeEnum);
613 items[i].isDataOwned=FALSE;
616 items[itemCount-1].length=length-ds->readUInt32(inEntries[itemCount-1].dataOffset);
619 typeEnum=getTypeEnumForInputData(items[itemCount-1].data, items[itemCount-1].length, &errorCode);
621 fprintf(stderr, "icupkg: not an ICU data file: item \"%s\" in \"%s\"\n", items[i-1].name, filename);
624 items[itemCount-1].type=makeTypeLetter(typeEnum);
746 length=(int32_t)strlen(items[i].name);
749 memcpy(name+prefixLength, items[i].name, length+1);
750 items[i].name=name;
753 // calculate offsets for item names and items, pad to 16-align items
782 entry.nameOffset=(uint32_t)(basenameOffset+(items[i].name-outStrings));
797 length=items[i].length;
811 // write the items
812 for(pItem=items, i=0; i<itemCount; ++pItem, ++i) {
854 result=strncmp(name, items[i].name, length);
856 result=strcmp(name, items[i].name);
866 while(i>0 && 0==strncmp(name, items[i-1].name, length)) {
928 name=items[idx].name;
958 // no more items
981 // move the following items down
984 memmove(items+idx+1, items+idx, (itemCount-idx)*sizeof(Item));
989 memset(items+idx, 0, sizeof(Item));
992 items[idx].name=allocString(TRUE, strlen(name));
993 strcpy(items[idx].name, name);
994 pathToTree(items[idx].name);
997 if(items[idx].isDataOwned) {
998 free(items[idx].data);
1005 items[idx].data=data;
1006 items[idx].length=length;
1007 items[idx].isDataOwned=isDataOwned;
1008 items[idx].type=type;
1027 for(pItem=listPkg.items, i=0; i<listPkg.itemCount; ++pItem, ++i) {
1036 if(items[idx].isDataOwned) {
1037 free(items[idx].data);
1040 // move the following items up
1042 memmove(items+idx, items+idx+1, (itemCount-(idx+1))*sizeof(Item));
1067 for(pItem=listPkg.items, i=0; i<listPkg.itemCount; ++pItem, ++i) {
1085 pItem=items+idx;
1132 extractItem(filesPath, items[idx].name, idx, outType);
1150 for(pItem=listPkg.items, i=0; i<listPkg.itemCount; ++pItem, ++i) {
1163 return &items[idx];
1190 enumDependencies(items+i, context, check);
1223 uprv_sortArray(items, itemCount, (int32_t)sizeof(Item), compareItems, NULL, FALSE, &errorCode);
1235 Item *newItems = (Item*)uprv_malloc(max * sizeof(items[0]));
1236 Item *oldItems = items;
1238 fprintf(stderr, "icupkg: Out of memory trying to allocate %ld bytes for %d items\n", max*sizeof(items[0]), max);
1241 if(items && itemCount>0) {
1242 uprv_memcpy(newItems, items, itemCount*sizeof(items[0]));
1245 items = newItems;