Revision 99
Added by markw about 11 years ago
firmware/fat/pff.c | ||
---|---|---|
/*-----------------------------------------------------------------------*/
|
||
|
||
static
|
||
FRESULT dir_next ( /* FR_OK:Succeeded, FR_NO_FILE:End of table */
|
||
FRESULT dir_next2 ( /* FR_OK:Succeeded, FR_NO_FILE:End of table */
|
||
DIR *dj /* Pointer to directory object */
|
||
)
|
||
{
|
||
... | ... | |
if (c == 0) { res = FR_NO_FILE; break; } /* Reached to end of table */
|
||
if (!(dir[DIR_Attr] & AM_VOL) && !mem_cmp(dir, dj->fn, 11)) /* Is it a valid entry? */
|
||
break;
|
||
res = dir_next(dj); /* Next entry */
|
||
res = dir_next2(dj); /* Next entry */
|
||
} while (res == FR_OK);
|
||
|
||
return res;
|
||
... | ... | |
|
||
if (c != 0xE5 && c != '.' && !(a & AM_VOL)) /* Is it a valid entry? */
|
||
break;
|
||
res = dir_next(dj); /* Next entry */
|
||
res = dir_next2(dj); /* Next entry */
|
||
if (res != FR_OK) break;
|
||
}
|
||
|
||
... | ... | |
}
|
||
if (res == FR_OK) { /* A valid entry is found */
|
||
get_fileinfo(dj, dir, fno); /* Get the object information */
|
||
res = dir_next(dj); /* Increment index for next */
|
||
res = dir_next2(dj); /* Increment index for next */
|
||
if (res == FR_NO_FILE) {
|
||
dj->sect = 0;
|
||
res = FR_OK;
|
Also available in: Unified diff
Fix name clash if all in one compilation unit