Lines Matching defs:cpe

171 static void freeCpeArray(ClassPathEntry* cpe);
504 static void dumpClassPath(const ClassPathEntry* cpe)
508 while (cpe->kind != kCpeLastEntry) {
511 switch (cpe->kind) {
517 ALOGI(" %2d: type=%s %s %p", idx, kindStr, cpe->fileName, cpe->ptr);
518 if (CALC_CACHE_STATS && cpe->kind == kCpeJar) {
519 JarFile* pJarFile = (JarFile*) cpe->ptr;
524 cpe++;
540 bool dvmClassPathContains(const ClassPathEntry* cpe, const char* path)
542 while (cpe->kind != kCpeLastEntry) {
543 if (strcmp(cpe->fileName, path) == 0)
546 cpe++;
556 static void freeCpeArray(ClassPathEntry* cpe)
558 ClassPathEntry* cpeStart = cpe;
560 if (cpe == NULL)
563 while (cpe->kind != kCpeLastEntry) {
564 switch (cpe->kind) {
567 dvmJarFileFree((JarFile*) cpe->ptr);
571 dvmRawDexFileFree((RawDexFile*) cpe->ptr);
578 free(cpe->fileName);
579 cpe++;
603 static bool prepareCpe(ClassPathEntry* cpe, bool isBootstrap)
607 if (stat(cpe->fileName, &sb) < 0) {
608 ALOGD("Unable to stat classpath element '%s'", cpe->fileName);
612 ALOGE("Directory classpath elements are not supported: %s", cpe->fileName);
617 getFileNameSuffix(cpe->fileName, suffix, sizeof(suffix));
622 if (dvmJarFileOpen(cpe->fileName, NULL, &pJarFile, isBootstrap) == 0) {
623 cpe->kind = kCpeJar;
624 cpe->ptr = pJarFile;
629 if (dvmRawDexFileOpen(cpe->fileName, NULL, &pRawDexFile, isBootstrap) == 0) {
630 cpe->kind = kCpeDex;
631 cpe->ptr = pRawDexFile;
638 ALOGD("Unable to process classpath element '%s'", cpe->fileName);
656 ClassPathEntry* cpe = NULL;
685 cpe = (ClassPathEntry*) calloc(count+1, sizeof(ClassPathEntry));
690 gDvm.bootClassPath = cpe;
704 free(cpe);
705 cpe = NULL;
718 cpe[idx].kind = kCpeLastEntry;
719 cpe[idx].fileName = NULL;
720 cpe[idx].ptr = NULL;
727 cpe[idx] = tmp;
748 cpe[idx].kind = kCpeLastEntry;
749 cpe[idx].fileName = NULL;
750 cpe[idx].ptr = NULL;
752 //dumpClassPath(cpe);
756 gDvm.bootClassPath = cpe;
757 return cpe;
770 const ClassPathEntry* cpe = gDvm.bootClassPath;
777 while (cpe->kind != kCpeLastEntry) {
778 //ALOGV("+++ checking '%s' (%d)", cpe->fileName, cpe->kind);
780 switch (cpe->kind) {
783 JarFile* pJarFile = (JarFile*) cpe->ptr;
799 RawDexFile* pRawDexFile = (RawDexFile*) cpe->ptr;
814 ALOGE("Unknown kind %d", cpe->kind);
819 cpe++;
865 const ClassPathEntry* cpe = gDvm.bootClassPath;
867 while (cpe->kind != kCpeLastEntry)
868 cpe++;
870 return cpe - gDvm.bootClassPath;
887 const ClassPathEntry* cpe = gDvm.bootClassPath;
891 name, idx, cpe[idx].fileName);
894 while (idx-- && cpe->kind != kCpeLastEntry)
895 cpe++;
896 if (cpe->kind == kCpeLastEntry) {
901 char urlBuf[strlen(name) + strlen(cpe->fileName) + kUrlOverhead +1];
903 switch (cpe->kind) {
906 JarFile* pJarFile = (JarFile*) cpe->ptr;
909 sprintf(urlBuf, "jar:file://%s!/%s", cpe->fileName, name);