Lines Matching refs:dp
84 hasCHKName(struct pcdir *dp) in hasCHKName() argument
86 return (dp->pcd_filename[CHKNAME_F] == 'F' && in hasCHKName()
87 dp->pcd_filename[CHKNAME_I] == 'I' && in hasCHKName()
88 dp->pcd_filename[CHKNAME_L] == 'L' && in hasCHKName()
89 dp->pcd_filename[CHKNAME_E] == 'E' && in hasCHKName()
90 isdigit(dp->pcd_filename[CHKNAME_THOUSANDS]) && in hasCHKName()
91 isdigit(dp->pcd_filename[CHKNAME_HUNDREDS]) && in hasCHKName()
92 isdigit(dp->pcd_filename[CHKNAME_TENS]) && in hasCHKName()
93 isdigit(dp->pcd_filename[CHKNAME_ONES]) && in hasCHKName()
94 dp->pcd_ext[CHKNAME_C] == 'C' && in hasCHKName()
95 dp->pcd_ext[CHKNAME_H] == 'H' && in hasCHKName()
96 dp->pcd_ext[CHKNAME_K] == 'K'); in hasCHKName()
109 addToCHKList(struct pcdir *dp) in addToCHKList() argument
113 chknum = 1000 * (dp->pcd_filename[CHKNAME_THOUSANDS] - '0'); in addToCHKList()
114 chknum += 100 * (dp->pcd_filename[CHKNAME_HUNDREDS] - '0'); in addToCHKList()
115 chknum += 10 * (dp->pcd_filename[CHKNAME_TENS] - '0'); in addToCHKList()
116 chknum += (dp->pcd_filename[CHKNAME_ONES] - '0'); in addToCHKList()
127 appendToPath(struct pcdir *dp, char *thePath, int *theLen) in appendToPath() argument
151 if ((dp->pcd_filename[i] == ' ') || in appendToPath()
152 !(pc_validchar(dp->pcd_filename[i]))) in appendToPath()
154 *(thePath + (*theLen)++) = dp->pcd_filename[i++]; in appendToPath()
159 if ((dp->pcd_ext[i] == ' ') || ((*theLen) >= MAXPATHLEN) || in appendToPath()
160 (!(pc_validchar(dp->pcd_ext[i])))) in appendToPath()
168 if ((dp->pcd_ext[i] == ' ') || !(pc_validchar(dp->pcd_ext[i]))) in appendToPath()
170 *(thePath + (*theLen)++) = dp->pcd_ext[i++]; in appendToPath()
175 printName(FILE *outDest, struct pcdir *dp) in printName() argument
179 if ((dp->pcd_filename[i] == ' ') || in printName()
180 !(pc_validchar(dp->pcd_filename[i]))) in printName()
182 (void) fprintf(outDest, "%c", dp->pcd_filename[i]); in printName()
186 if (!(pc_validchar(dp->pcd_ext[i]))) in printName()
188 (void) fprintf(outDest, "%c", dp->pcd_ext[i]); in printName()
200 sanityCheckSize(int fd, struct pcdir *dp, int32_t actualClusterCount, in sanityCheckSize() argument
210 sizeFromDir = extractSize(dp); in sanityCheckSize()
240 splitChain(fd, dp, startCluster, orphanEntry, &ignorei); in sanityCheckSize()
245 noteUsage(int fd, int32_t startAt, struct pcdir *dp, struct pcdir *lp, in noteUsage() argument
257 if ((markInUse(fd, chain, dp, lp, longEntryStartCluster, in noteUsage()
284 if (sanityCheckSize(fd, dp, count, isDir, startAt, in noteUsage()
300 storeInfoAboutEntry(int fd, struct pcdir *dp, struct pcdir *ldp, int depth, in storeInfoAboutEntry() argument
306 int hidden = (dp->pcd_attr & PCA_HIDDEN || dp->pcd_attr & PCA_SYSTEM); in storeInfoAboutEntry()
307 int dir = (dp->pcd_attr & PCA_DIR); in storeInfoAboutEntry()
316 appendToPath(dp, fullPath, fullLen); in storeInfoAboutEntry()
343 printName(stderr, dp); in storeInfoAboutEntry()
348 extractSize(dp), extractStartCluster(dp)); in storeInfoAboutEntry()
351 start = extractStartCluster(dp); in storeInfoAboutEntry()
352 haveBad = noteUsage(fd, start, dp, ldp, longEntryStartCluster, in storeInfoAboutEntry()
362 truncChainWithBadCluster(fd, dp, start); in storeInfoAboutEntry()
371 storeInfoAboutLabel(struct pcdir *dp) in storeInfoAboutLabel() argument
380 printName(stderr, dp); in storeInfoAboutLabel()
386 searchChecks(struct pcdir *dp, int operation, char matchRequired, in searchChecks() argument
407 if (operation == PCFS_FIND_ATTR && dp->pcd_attr == matchRequired) { in searchChecks()
408 *found = dp; in searchChecks()
410 dp->pcd_filename[0] == matchRequired) { in searchChecks()
411 *found = dp; in searchChecks()
412 } else if (operation == PCFS_FIND_CHKS && hasCHKName(dp)) { in searchChecks()
413 addToCHKList(dp); in searchChecks()
418 catalogEntry(int fd, struct pcdir *dp, struct pcdir *longdp, in catalogEntry() argument
421 if (dp->pcd_attr & PCA_LABEL) { in catalogEntry()
422 storeInfoAboutLabel(dp); in catalogEntry()
424 storeInfoAboutEntry(fd, dp, longdp, depth, currentCluster, in catalogEntry()
496 struct pcdir *dp; in visitNodes() local
501 dp = dirData->dirp; in visitNodes()
507 while ((uchar_t *)dp < dirData->bytes + dirDataLen && in visitNodes()
508 dp->pcd_filename[0] != PCD_UNUSED) { in visitNodes()
512 searchChecks(dp, operation, matchRequired, found); in visitNodes()
524 if ((dp->pcd_attr & PCDL_LFN_BITS) == PCDL_LFN_BITS) { in visitNodes()
528 longdp = dp; in visitNodes()
530 dp++; in visitNodes()
532 } else if ((dp->pcd_filename[0] == PCD_ERASED) || in visitNodes()
533 (dp->pcd_filename[0] == '.')) { in visitNodes()
540 dp++; in visitNodes()
545 catalogEntry(fd, dp, longdp, longStart, depth, in visitNodes()
549 if (dp->pcd_attr & PCA_DIR && descend == PCFS_VISIT_SUBDIRS) { in visitNodes()
550 traverseDir(fd, extractStartCluster(dp), depth + 1, in visitNodes()
556 dp++; in visitNodes()
561 if ((uchar_t *)dp < dirData->bytes + dirDataLen) { in visitNodes()
569 *dirEnd = dp; in visitNodes()
744 extractSize(struct pcdir *dp) in extractSize() argument
748 read_32_bits((uchar_t *)&(dp->pcd_size), &returnMe); in extractSize()
753 extractStartCluster(struct pcdir *dp) in extractStartCluster() argument
758 read_16_bits((uchar_t *)&(dp->un.pcd_scluster_hi), &hi); in extractStartCluster()
759 read_16_bits((uchar_t *)&(dp->pcd_scluster_lo), &lo); in extractStartCluster()
762 read_16_bits((uchar_t *)&(dp->pcd_scluster_lo), &lo); in extractStartCluster()
877 updateDirEnt_CreatTime(struct pcdir *dp) in updateDirEnt_CreatTime() argument
879 getNow(&dp->pcd_crtime, &dp->pcd_crtime_msec); in updateDirEnt_CreatTime()
880 markClusterModified(findImpactedCluster(dp)); in updateDirEnt_CreatTime()
884 updateDirEnt_ModTimes(struct pcdir *dp) in updateDirEnt_ModTimes() argument
888 getNow(&dp->pcd_mtime, NULL); in updateDirEnt_ModTimes()
889 dp->pcd_ladate = dp->pcd_mtime.pct_date; in updateDirEnt_ModTimes()
890 dp->pcd_attr |= PCA_ARCH; in updateDirEnt_ModTimes()
891 markClusterModified(findImpactedCluster(dp)); in updateDirEnt_ModTimes()
1038 updateDirEnt_Size(struct pcdir *dp, uint32_t newSize) in updateDirEnt_Size() argument
1040 uchar_t *p = (uchar_t *)&(dp->pcd_size); in updateDirEnt_Size()
1042 markClusterModified(findImpactedCluster(dp)); in updateDirEnt_Size()
1046 updateDirEnt_Start(struct pcdir *dp, int32_t newStart) in updateDirEnt_Start() argument
1048 uchar_t *p = (uchar_t *)&(dp->pcd_scluster_lo); in updateDirEnt_Start()
1051 p = (uchar_t *)&(dp->un.pcd_scluster_hi); in updateDirEnt_Start()
1054 markClusterModified(findImpactedCluster(dp)); in updateDirEnt_Start()
1058 updateDirEnt_Name(struct pcdir *dp, char *newName) in updateDirEnt_Name() argument
1064 dp->pcd_filename[i] = *newName++; in updateDirEnt_Name()
1066 dp->pcd_filename[i] = ' '; in updateDirEnt_Name()
1068 markClusterModified(findImpactedCluster(dp)); in updateDirEnt_Name()