18 #define _RPMFI_INTERNAL
21 #define _RPMTE_INTERNAL
38 if (fi == NULL)
return NULL;
41 fprintf(stderr,
"--> fi %p -- %d %s at %s:%u\n", fi, fi->nrefs, msg, fn, ln);
49 if (fi == NULL)
return NULL;
53 fprintf(stderr,
"--> fi %p ++ %d %s at %s:%u\n", fi, fi->nrefs, msg, fn, ln);
60 return (fi != NULL ? fi->fc : 0);
65 return (fi != NULL ? fi->dc : 0);
76 return (fi != NULL ? fi->i : -1);
83 if (fi != NULL && fx >= 0 && fx < fi->fc) {
87 fi->j = fi->dil[fi->i];
95 return (fi != NULL ? fi->j : -1);
102 if (fi != NULL && dx >= 0 && dx < fi->dc) {
111 const char * BN = NULL;
113 if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
124 const char * DN = NULL;
126 if (fi != NULL && fi->j >= 0 && fi->j < fi->dc) {
137 const char * FN =
"";
140 if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
146 (void)
urlPath(fi->dnl[fi->dil[fi->i]], &dn);
150 t =
stpcpy(t, fi->bnl[fi->i]);
161 if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
163 if (fi->fflags != NULL)
164 FFlags = fi->fflags[fi->i];
174 if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
176 if (fi->fflags != NULL && fi->h == NULL) {
177 oFFlags = fi->fflags[fi->i];
178 *((
uint_32 *)(fi->fflags + fi->i)) = FFlags;
189 if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
191 if (fi->vflags != NULL)
192 VFlags = fi->vflags[fi->i];
202 if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
204 if (fi->vflags != NULL && fi->h == NULL) {
205 oVFlags = fi->vflags[fi->i];
206 *((
uint_32 *)(fi->vflags + fi->i)) = VFlags;
217 if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
219 if (fi->fmodes != NULL)
220 fmode = fi->fmodes[fi->i];
230 if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
232 if (fi->fstates != NULL)
233 fstate = fi->fstates[fi->i];
243 if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
245 if (fi->fstates != NULL) {
246 ofstate = fi->fstates[fi->i];
247 fi->fstates[fi->i] = fstate;
256 unsigned char * digest = NULL;
258 if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
260 if (fi->digests != NULL) {
261 digest = fi->digests + (fi->digestlen * fi->i);
263 *algop = (fi->fdigestalgos
264 ? fi->fdigestalgos[fi->i] : fi->digestalgo);
266 *lenp = fi->digestlen;
275 const char * flink = NULL;
277 if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
279 if (fi->flinks != NULL)
280 flink = fi->flinks[fi->i];
290 if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
292 if (fi->fsizes != NULL)
293 fsize = fi->fsizes[fi->i];
303 if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
305 if (fi->frdevs != NULL)
306 frdev = fi->frdevs[fi->i];
316 if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
318 if (fi->finodes != NULL)
319 finode = fi->finodes[fi->i];
331 color = fi->color & 0xf;
339 if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
341 if (fi->fcolors != NULL)
343 fcolor = (fi->fcolors[fi->i] & 0x0f);
351 const char * fclass = NULL;
354 if (fi != NULL && fi->fcdictx != NULL && fi->i >= 0 && fi->i < fi->fc) {
356 cdictx = fi->fcdictx[fi->i];
357 if (fi->cdict != NULL && cdictx >= 0 && cdictx < fi->ncdict)
358 fclass = fi->cdict[cdictx];
366 const char * fcontext = NULL;
368 if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
370 if (fi->fcontexts != NULL)
371 fcontext = fi->fcontexts[fi->i];
383 if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
385 if (fi->fddictn != NULL)
386 fddictn = fi->fddictn[fi->i];
387 if (fddictn > 0 && fi->fddictx != NULL)
388 fddictx = fi->fddictx[fi->i];
389 if (fi->ddict != NULL && fddictx >= 0 && (fddictx+fddictn) <= fi->nddict)
390 fddict = fi->ddict + fddictx;
404 if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
407 if (fi->finodes && fi->frdevs) {
408 int_32 finode = fi->finodes[fi->i];
409 int_16 frdev = fi->frdevs[fi->i];
412 for (j = 0; j < fi->fc; j++) {
413 if (fi->frdevs[j] == frdev && fi->finodes[j] == finode)
426 if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
428 if (fi->fmtimes != NULL)
429 fmtime = fi->fmtimes[fi->i];
437 const char * fuser = NULL;
440 if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
442 if (fi->fuser != NULL)
443 fuser = fi->fuser[fi->i];
451 const char * fgroup = NULL;
454 if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
456 if (fi->fgroup != NULL)
457 fgroup = fi->fgroup[fi->i];
467 if (fi != NULL && ++fi->i >= 0) {
468 if (fi->i < fi->fc) {
472 fi->j = fi->dil[fi->i];
479 fprintf(stderr,
"*** fi %p\t%s[%d] %s%s\n", fi, (fi->Type ? fi->Type :
"?Type?"), i, (i >= 0 ? fi->dnl[fi->j] :
""), (i >= 0 ? fi->bnl[fi->i] :
""));
490 if (fx >= 0 && fx < fi->fc) {
505 if (fi != NULL && ++fi->j >= 0) {
513 fprintf(stderr,
"*** fi %p\t%s[%d]\n", fi, (fi->Type ? fi->Type :
"?Type?"), j);
524 if (dx >= 0 && dx < fi->fc)
545 case XDIR:
return "directory";
546 case CDEV:
return "char dev";
547 case BDEV:
return "block dev";
548 case LINK:
return "link";
549 case SOCK:
return "sock";
550 case PIPE:
return "fifo/pipe";
551 case REG:
return "file";
552 default:
return "unknown file type";
559 if (S_ISDIR(mode))
return XDIR;
560 if (S_ISCHR(mode))
return CDEV;
561 if (S_ISBLK(mode))
return BDEV;
566 if (S_ISFIFO(mode))
return PIPE;
577 if (awhat != bwhat)
return 1;
582 if (alink == blink)
return 0;
583 if (alink == NULL)
return 1;
584 if (blink == NULL)
return -1;
585 return strcmp(alink, blink);
586 }
else if (awhat ==
REG) {
589 const unsigned char * adigest =
rpmfiDigest(afi, &aalgo, &alen);
592 const unsigned char * bdigest =
rpmfiDigest(bfi, &balgo, &blen);
594 if (!(aalgo == balgo && alen == blen))
596 if (adigest == bdigest)
return 0;
597 if (adigest == NULL)
return 1;
598 if (bdigest == NULL)
return -1;
599 return memcmp(adigest, bdigest, alen);
609 const char * fn =
rpmfiFN(nfi);
616 if (lstat(fn, &sb)) {
641 if (diskWhat != newWhat && dbWhat !=
REG && dbWhat !=
LINK)
643 else if (newWhat != dbWhat && diskWhat != dbWhat)
645 else if (dbWhat != newWhat)
647 else if (dbWhat !=
LINK && dbWhat !=
REG)
654 memset(buffer, 0,
sizeof(buffer));
658 const unsigned char * odigest;
661 const unsigned char * ndigest;
663 if (diskWhat ==
REG) {
665 if (
dodigest(oalgo, fn, buffer, 0, NULL))
667 if (odigest && !memcmp(odigest, buffer, olen))
672 if (odigest && ndigest && oalgo == nalgo && olen == nlen
673 && !memcmp(odigest, ndigest, nlen))
677 const char * oFLink, * nFLink;
679 if (diskWhat ==
LINK) {
680 if (readlink(fn, buffer,
sizeof(buffer) - 1) == -1)
682 buffer[
sizeof(buffer)-1] =
'\0';
683 if (oFLink && !strcmp(oFLink, buffer))
688 if (oFLink && nFLink && !strcmp(oFLink, nFLink))
709 default:
return "???";
714 #define alloca_strdup(_s) strcpy(alloca(strlen(_s)+1), (_s))
737 static int _printed = 0;
741 const char ** validRelocations;
744 const char ** baseNames;
745 const char ** dirNames;
759 int haveRelocatedFile = 0;
764 if (!hge(origH,
RPMTAG_PREFIXES, &validType, &validRelocations, &numValid))
770 while (p->relocs[numRelocations].newPath ||
771 p->relocs[numRelocations].oldPath)
780 if (p->relocs == NULL || numRelocations == 0) {
784 validType, validRelocations, numValid);
785 validRelocations = hfd(validRelocations, validType);
793 relocations =
alloca(
sizeof(*relocations) * numRelocations);
796 for (i = 0; i < numRelocations; i++) {
803 if (p->relocs[i].oldPath == NULL)
continue;
809 relocations[i].
oldPath = (t[0] ==
'/' && t[1] ==
'\0')
815 if (p->relocs[i].newPath) {
820 relocations[i].
newPath = (t[0] ==
'/' && t[1] ==
'\0')
827 for (j = 0; j < numValid; j++) {
828 if (!strcmp(validRelocations[j], relocations[i].oldPath))
833 if (j == numValid && !allowBadRelocate && actions) {
837 relocations[i].oldPath, NULL, NULL, 0);
841 strlen(relocations[i].newPath) - strlen(relocations[i].oldPath);
852 for (i = 0; i < numRelocations; i++) {
855 for (j = 1; j < numRelocations; j++) {
857 if (relocations[j - 1].
oldPath == NULL ||
858 relocations[j ].
oldPath == NULL ||
862 tmpReloc = relocations[j - 1];
863 relocations[j - 1] = relocations[j];
864 relocations[j] = tmpReloc;
868 if (!madeSwap)
break;
874 for (i = 0; i < numRelocations; i++) {
875 if (relocations[i].
oldPath == NULL)
continue;
876 if (relocations[i].
newPath == NULL)
881 i, relocations[i].oldPath, relocations[i].
newPath);
887 const char ** actualRelocations;
890 actualRelocations =
xmalloc(numValid *
sizeof(*actualRelocations));
892 for (i = 0; i < numValid; i++) {
893 for (j = 0; j < numRelocations; j++) {
894 if (relocations[j].
oldPath == NULL ||
895 strcmp(validRelocations[i], relocations[j].
oldPath))
899 actualRelocations[numActual] = relocations[j].
newPath;
904 if (j == numRelocations) {
905 actualRelocations[numActual] = validRelocations[i];
912 (
void **) actualRelocations, numActual);
914 actualRelocations =
_free(actualRelocations);
915 validRelocations = hfd(validRelocations, validType);
925 dColors =
alloca(dirCount *
sizeof(*dColors));
926 memset(dColors, 0, dirCount *
sizeof(*dColors));
928 newDirIndexes =
alloca(
sizeof(*newDirIndexes) * fileCount);
929 memcpy(newDirIndexes, dirIndexes,
sizeof(*newDirIndexes) * fileCount);
930 dirIndexes = newDirIndexes;
940 for (i = fileCount - 1; i >= 0; i--) {
945 strlen(dirNames[dirIndexes[i]]) + strlen(baseNames[i]) + 1;
947 if (len >= fileAlloced) {
948 fileAlloced = len * 2;
955 fnlen =
stpcpy(
stpcpy(fn, dirNames[dirIndexes[i]]), baseNames[i]) - fn;
957 if (fColors != NULL) {
959 for (j = 0; j < dirCount; j++) {
960 if (strcmp(dirNames[dirIndexes[i]], dirNames[j]))
continue;
961 dColors[j] |= fColors[i];
972 for (j = numRelocations - 1; j >= 0; j--) {
973 if (relocations[j].
oldPath == NULL)
975 len = strcmp(relocations[j].
oldPath,
"/")
976 ? strlen(relocations[j].oldPath)
985 if (!(fn[len] ==
'/' || fnlen == len))
988 if (strncmp(relocations[j].oldPath, fn, len))
999 if (relocations[j].
newPath == NULL) {
1002 for (j = dirIndexes[i]; j < dirCount; j++) {
1003 len = strlen(dirNames[j]) - 1;
1004 while (len > 0 && dirNames[j][len-1] ==
'/') len--;
1007 if (strncmp(fn, dirNames[j], fnlen))
1021 if (fnlen != len)
continue;
1028 strcpy(fn, relocations[j].newPath);
1029 {
char * te = strrchr(fn,
'/');
1034 te = fn + strlen(fn);
1036 if (strcmp(baseNames[i], te))
1043 for (j = 0; j < dirCount; j++) {
1044 if (fnlen != strlen(dirNames[j]))
1046 if (strncmp(fn, dirNames[j], fnlen))
1057 if (!haveRelocatedFile) {
1058 const char ** newDirList;
1060 haveRelocatedFile = 1;
1061 newDirList =
xmalloc((dirCount + 1) *
sizeof(*newDirList));
1062 for (j = 0; j < dirCount; j++)
1065 dirNames = newDirList;
1068 sizeof(*dirNames) * (dirCount + 1));
1072 dirIndexes[i] = dirCount;
1077 for (i = dirCount - 1; i >= 0; i--) {
1078 for (j = numRelocations - 1; j >= 0; j--) {
1081 if (j == p->autorelocatex
1082 && (dColors[i] == 0 || !(dColors[i] & mydColor)))
1085 if (relocations[j].
oldPath == NULL)
1087 len = strcmp(relocations[j].
oldPath,
"/")
1088 ? strlen(relocations[j].oldPath)
1091 if (len && strncmp(relocations[j].oldPath, dirNames[i], len))
1098 if (dirNames[i][len] !=
'/')
1102 const char * s = relocations[j].
newPath;
1103 char * t =
alloca(strlen(s) + strlen(dirNames[i]) - len + 1);
1116 D_(
"relocating directory %s to %s\n"), dirNames[i], t);
1145 baseNames, fileCount);
1150 dirNames, dirCount);
1155 dirIndexes, fileCount);
1173 if (fi == NULL)
return NULL;
1180 fprintf(stderr,
"*** fi %p\t%s[%d]\n", fi, fi->Type, fi->fc);
1184 fi->pretrans =
_free(fi->pretrans);
1185 fi->pretransprog =
_free(fi->pretransprog);
1186 fi->posttrans =
_free(fi->posttrans);
1187 fi->posttransprog =
_free(fi->posttransprog);
1191 fi->bnl = hfd(fi->bnl, -1);
1192 fi->dnl = hfd(fi->dnl, -1);
1194 fi->flinks = hfd(fi->flinks, -1);
1195 fi->flangs = hfd(fi->flangs, -1);
1196 fi->fdigests = hfd(fi->fdigests, -1);
1197 fi->digests =
_free(fi->digests);
1199 fi->cdict = hfd(fi->cdict, -1);
1201 fi->fuser = hfd(fi->fuser, -1);
1202 fi->fgroup = hfd(fi->fgroup, -1);
1204 fi->fstates =
_free(fi->fstates);
1207 if (!fi->keep_header && fi->h == NULL) {
1208 fi->fmtimes =
_free(fi->fmtimes);
1209 fi->fmodes =
_free(fi->fmodes);
1210 fi->fflags =
_free(fi->fflags);
1211 fi->vflags =
_free(fi->vflags);
1212 fi->fsizes =
_free(fi->fsizes);
1213 fi->frdevs =
_free(fi->frdevs);
1214 fi->finodes =
_free(fi->finodes);
1215 fi->dil =
_free(fi->dil);
1217 fi->fcolors =
_free(fi->fcolors);
1218 fi->fcdictx =
_free(fi->fcdictx);
1219 fi->ddict =
_free(fi->ddict);
1220 fi->fddictx =
_free(fi->fddictx);
1221 fi->fddictn =
_free(fi->fddictn);
1230 fi->fn =
_free(fi->fn);
1231 fi->apath =
_free(fi->apath);
1232 fi->fmapflags =
_free(fi->fmapflags);
1234 fi->obnl = hfd(fi->obnl, -1);
1235 fi->odnl = hfd(fi->odnl, -1);
1237 fi->fcontexts = hfd(fi->fcontexts, -1);
1239 fi->actions =
_free(fi->actions);
1240 fi->replacedSizes =
_free(fi->replacedSizes);
1241 fi->replaced =
_free(fi->replaced);
1247 memset(fi, 0,
sizeof(*fi));
1262 if (c >=
'0' && c <=
'9')
1264 if (c >=
'A' && c <=
'F')
1265 return (c -
'A') + 10;
1266 if (c >=
'a' && c <=
'f')
1267 return (c -
'a') + 10;
1271 #define _fdupe(_fi, _data) \
1272 if ((_fi)->_data != NULL) \
1273 (_fi)->_data = memcpy(xmalloc((_fi)->fc * sizeof(*(_fi)->_data)), \
1274 (_fi)->_data, (_fi)->fc * sizeof(*(_fi)->_data))
1277 #define _fdupestring(_h, _tag, _data) \
1278 if (hge((_h), (_tag), NULL, &(_data), NULL)) \
1279 _data = xstrdup(_data)
1284 int scareMem = (flags & 0x1);
1298 assert(scareMem == 0);
1311 fi->magic = RPMFIMAGIC;
1322 fi->h = (h != NULL && scareMem ?
headerLink(h) : NULL);
1324 if (fi->fsm == NULL)
1332 fi->archiveSize = (xx ? *uip : 0);
1354 if (fi->fcolors != NULL)
1355 for (i = 0; i < fi->fc; i++)
1356 fi->color |= fi->fcolors[i];
1365 if (xx == 0 || fi->fstates == NULL)
1366 fi->fstates =
xcalloc(fi->fc,
sizeof(*fi->fstates));
1373 if (fi->actions == NULL)
1374 fi->actions =
xcalloc(fi->fc,
sizeof(*fi->actions));
1376 fi->keep_header = (scareMem ? 1 : 0);
1387 fi->fdigestalgos = NULL;
1389 if (fi->fdigestalgos) {
1392 for (i = 0; i < fi->fc; i++) {
1393 if (fi->fdigestalgos[i] == 0)
1396 dalgo = fi->fdigestalgos[i];
1398 assert(dalgo == fi->fdigestalgos[i]);
1400 fi->digestalgo = dalgo;
1411 fi->fdigestalgos = NULL;
1414 fi->fdigests = NULL;
1419 t =
xmalloc(fi->fc * fi->digestlen);
1421 for (i = 0; i < fi->fc; i++) {
1422 const char * fdigests;
1425 fdigests = fi->fdigests[i];
1426 if (!(fdigests && *fdigests !=
'\0')) {
1427 memset(t, 0, fi->digestlen);
1431 for (j = 0; j < fi->digestlen; j++, t++, fdigests += 2)
1434 fi->fdigests = hfd(fi->fdigests, -1);
1443 fi->replacedSizes =
xcalloc(fi->fc,
sizeof(*fi->replacedSizes));
1454 const char * fmt =
rpmGetPath(
"%{?_autorelocate_path}", NULL);
1455 const char * errstr;
1465 if (newPath != NULL && *newPath !=
'\0'
1466 && strlen(newPath) >= (
sizeof(
"/emul/i386")-1)
1467 && newPath[0] ==
'/' && newPath[1] ==
'e' && newPath[2] ==
'm'
1468 && newPath[3] ==
'u' && newPath[4] ==
'l' && newPath[5] ==
'/'
1469 && newPath[6] ==
'i' && newPath[8] ==
'8' && newPath[9] ==
'6')
1479 if (newPath != NULL && *newPath !=
'\0' && p->relocs != NULL)
1480 for (i = 0; i < p->nrelocs; i++) {
1482 if (strcmp(p->relocs[i].oldPath,
"/"))
1484 if (strcmp(p->relocs[i].newPath, newPath))
1492 if (newPath != NULL && *newPath !=
'\0' && i == p->nrelocs) {
1495 xrealloc(p->relocs, (p->nrelocs + 2) *
sizeof(*p->relocs));
1496 p->relocs[p->nrelocs].oldPath =
xstrdup(
"/");
1497 p->relocs[p->nrelocs].newPath =
xstrdup(newPath);
1498 p->autorelocatex = p->nrelocs;
1500 p->relocs[p->nrelocs].oldPath = NULL;
1501 p->relocs[p->nrelocs].newPath = NULL;
1503 newPath =
_free(newPath);
1506 if (fi->actions == NULL)
1507 fi->actions =
xcalloc(fi->fc,
sizeof(*fi->actions));
1529 if (fi->ddict != NULL)
1530 fi->ddict = memcpy(
xmalloc(fi->nddict *
sizeof(*fi->ddict)),
1531 fi->ddict, fi->nddict *
sizeof(*fi->ddict));
1540 for (i = 0; i < fi->dc; i++) {
1541 if ((len = strlen(fi->dnl[i])) > dnlmax)
1545 for (i = 0; i < fi->fc; i++) {
1546 if ((len = strlen(fi->bnl[i])) > bnlmax)
1549 fi->fnlen = dnlmax + bnlmax + 1;
1558 fprintf(stderr,
"*** fi %p\t%s[%d]\n", fi, Type, (fi ? fi->fc : 0));
1562 return rpmfiLink(fi, (fi ? fi->Type : NULL));
1567 const char *** fclassp,
int * fcp)
1571 const char * FClass;
1577 if ((ac =
rpmfiFC(fi)) <= 0) {
1584 nb = (ac + 1) *
sizeof(*av);
1589 if (FClass && *FClass !=
'\0')
1590 nb += strlen(FClass);
1596 t = ((
char *) av) + ((ac + 1) *
sizeof(*av));
1603 if (FClass && *FClass !=
'\0')
1622 const char *** fcontextp,
int * fcp)
1626 const char * fcontext;
1632 if ((ac =
rpmfiFC(fi)) <= 0) {
1639 nb = (ac + 1) *
sizeof(*av);
1644 if (fcontext && *fcontext !=
'\0')
1645 nb += strlen(fcontext);
1651 t = ((
char *) av) + ((ac + 1) *
sizeof(*av));
1658 if (fcontext && *fcontext !=
'\0')
1677 const char *** fcontextp,
int * fcp)
1685 char * fctxt = NULL;
1686 size_t fctxtlen = 0;
1689 if ((ac =
rpmfiFC(fi)) <= 0) {
1696 nb = ac *
sizeof(*fcnb);
1697 fcnb = memset(
alloca(nb), 0, nb);
1702 const char * fn =
rpmfiFN(fi);
1708 fctxt =
xrealloc(fctxt, fctxtlen + fcnb[ac]);
1709 memcpy(fctxt+fctxtlen, scon, fcnb[ac]);
1710 fctxtlen += fcnb[ac];
1718 nb = (ac + 1) *
sizeof(*av) + fctxtlen;
1720 t = ((
char *) av) + ((ac + 1) *
sizeof(*av));
1721 if (fctxt != NULL && fctxtlen > 0)
1722 (void) memcpy(t, fctxt, fctxtlen);
1748 const char *** fcontextp,
int * fcp)
1752 const char ** av = NULL;
1756 char * fctxt = NULL;
1757 size_t fctxtlen = 0;
1760 if ((ac =
rpmfiFC(fi)) <= 0) {
1766 {
const char *fn =
rpmGetPath(
"%{?__file_context_path}", NULL);
1767 if (fn != NULL && *fn !=
'\0')
1773 nb = ac *
sizeof(*fcnb);
1774 fcnb = memset(
alloca(nb), 0, nb);
1779 const char * fn =
rpmfiFN(fi);
1784 if (
matchpathcon(fn, fmode, &scon) == 0 && scon != NULL) {
1785 fcnb[ac] = strlen(scon) + 1;
1788 fctxt =
xrealloc(fctxt, fctxtlen + fcnb[ac]);
1789 memcpy(fctxt+fctxtlen, scon, fcnb[ac]);
1790 fctxtlen += fcnb[ac];
1799 nb = (ac + 1) *
sizeof(*av) + fctxtlen;
1801 t = ((
char *) av) + ((ac + 1) *
sizeof(*av));
1802 (void) memcpy(t, fctxt, fctxtlen);
1828 const char *** fdepsp,
int * fcp)
1844 if ((ac =
rpmfiFC(fi)) <= 0) {
1858 nb = (ac + 1) *
sizeof(*av);
1867 mydt = ((ix >> 24) & 0xff);
1868 if (mydt != deptype)
1876 nb += strlen(DNEVR+2) + 1;
1883 t = ((
char *) av) + ((ac + 1) *
sizeof(*av));
1895 mydt = ((ix >> 24) & 0xff);
1896 if (mydt != deptype)
1903 if (DNEVR != NULL) {