Lines Matching refs:fptr
3802 fp->fptr = 0; /* Set file pointer top of the file */
3808 fp->fptr = fp->obj.objsize; /* Offset to seek */
3870 remain = fp->obj.objsize - fp->fptr;
3873 …for ( ; btr > 0; btr -= rcnt, *br += rcnt, rbuff += rcnt, fp->fptr += rcnt) { /* Repeat until btr …
3874 if (fp->fptr % SS(fs) == 0) { /* On the sector boundary? */
3875 csect = (UINT)(fp->fptr / SS(fs) & (fs->csize - 1)); /* Sector offset in the cluster */
3877 if (fp->fptr == 0) { /* On the top of the file? */
3882 clst = clmt_clust(fp, fp->fptr); /* Get cluster# from the CLMT */
3929 rcnt = SS(fs) - (UINT)fp->fptr % SS(fs); /* Number of bytes remains in the sector */
3933 memcpy(rbuff, fs->win + fp->fptr % SS(fs), rcnt); /* Extract partial sector */
3935 memcpy(rbuff, fp->buf + fp->fptr % SS(fs), rcnt); /* Extract partial sector */
3971 if ((!FF_FS_EXFAT || fs->fs_type != FS_EXFAT) && (DWORD)(fp->fptr + btw) < (DWORD)fp->fptr) {
3972 btw = (UINT)(0xFFFFFFFF - (DWORD)fp->fptr);
3975 …-= wcnt, *bw += wcnt, wbuff += wcnt, fp->fptr += wcnt, fp->obj.objsize = (fp->fptr > fp->obj.objsi…
3976 if (fp->fptr % SS(fs) == 0) { /* On the sector boundary? */
3977 csect = (UINT)(fp->fptr / SS(fs)) & (fs->csize - 1); /* Sector offset in the cluster */
3979 if (fp->fptr == 0) { /* On the top of the file? */
3987 clst = clmt_clust(fp, fp->fptr); /* Get cluster# from the CLMT */
4034 if (fp->fptr >= fp->obj.objsize) { /* Avoid silly cache filling on the growing edge */
4040 fp->fptr < fp->obj.objsize &&
4047 wcnt = SS(fs) - (UINT)fp->fptr % SS(fs); /* Number of bytes remains in the sector */
4051 memcpy(fs->win + fp->fptr % SS(fs), wbuff, wcnt); /* Fit data to the sector */
4054 memcpy(fp->buf + fp->fptr % SS(fs), wbuff, wcnt); /* Fit data to the sector */
4421 fp->fptr = ofs; /* Set file pointer */
4427 if (fp->fptr % SS(fs) && dsc != fp->sect) { /* Refill sector cache if needed */
4452 ifptr = fp->fptr;
4453 fp->fptr = nsect = 0;
4458 fp->fptr = (ifptr - 1) & ~(FSIZE_t)(bcs - 1); /* start from the current cluster */
4459 ofs -= fp->fptr;
4475 ofs -= bcs; fp->fptr += bcs;
4478 …if (FF_FS_EXFAT && fp->fptr > fp->obj.objsize) { /* No FAT chain object needs correct objsize to g…
4479 fp->obj.objsize = fp->fptr;
4495 fp->fptr += ofs;
4503 …if (!FF_FS_READONLY && fp->fptr > fp->obj.objsize) { /* Set file change flag if the file size is e…
4504 fp->obj.objsize = fp->fptr;
4507 if (fp->fptr % SS(fs) && nsect != fp->sect) { /* Fill sector cache if needed */
4855 if (fp->fptr < fp->obj.objsize) { /* Process when fptr is not on the eof */
4856 if (fp->fptr == 0) { /* When set file size to zero, remove entire cluster chain */
4868 fp->obj.objsize = fp->fptr; /* Set file size to current read/write point */
5602 remain = fp->obj.objsize - fp->fptr;
5605 …for ( ; btf > 0 && (*func)(0, 0); fp->fptr += rcnt, *bf += rcnt, btf -= rcnt) { /* Repeat until al…
5606 csect = (UINT)(fp->fptr / SS(fs) & (fs->csize - 1)); /* Sector offset in the cluster */
5607 if (fp->fptr % SS(fs) == 0) { /* On the sector boundary? */
5609 clst = (fp->fptr == 0) ? /* On the top of the file? */
5635 rcnt = SS(fs) - (UINT)fp->fptr % SS(fs); /* Number of bytes remains in the sector */
5637 rcnt = (*func)(dbuf + ((UINT)fp->fptr % SS(fs)), rcnt); /* Forward the file data */