Lines Matching refs:fptr
3881 fp->fptr = 0; /* Set file pointer top of the file */
3887 fp->fptr = fp->obj.objsize; /* Offset to seek */
3949 remain = fp->obj.objsize - fp->fptr;
3952 …for ( ; btr > 0; btr -= rcnt, *br += rcnt, rbuff += rcnt, fp->fptr += rcnt) { /* Repeat until btr …
3953 if (fp->fptr % SS(fs) == 0) { /* On the sector boundary? */
3954 csect = (UINT)(fp->fptr / SS(fs) & (fs->csize - 1)); /* Sector offset in the cluster */
3956 if (fp->fptr == 0) { /* On the top of the file? */
3961 clst = clmt_clust(fp, fp->fptr); /* Get cluster# from the CLMT */
4008 rcnt = SS(fs) - (UINT)fp->fptr % SS(fs); /* Number of bytes remains in the sector */
4012 memcpy(rbuff, fs->win + fp->fptr % SS(fs), rcnt); /* Extract partial sector */
4014 memcpy(rbuff, fp->buf + fp->fptr % SS(fs), rcnt); /* Extract partial sector */
4050 if ((!FF_FS_EXFAT || fs->fs_type != FS_EXFAT) && (DWORD)(fp->fptr + btw) < (DWORD)fp->fptr) {
4051 btw = (UINT)(0xFFFFFFFF - (DWORD)fp->fptr);
4054 …-= wcnt, *bw += wcnt, wbuff += wcnt, fp->fptr += wcnt, fp->obj.objsize = (fp->fptr > fp->obj.objsi…
4055 if (fp->fptr % SS(fs) == 0) { /* On the sector boundary? */
4056 csect = (UINT)(fp->fptr / SS(fs)) & (fs->csize - 1); /* Sector offset in the cluster */
4058 if (fp->fptr == 0) { /* On the top of the file? */
4066 clst = clmt_clust(fp, fp->fptr); /* Get cluster# from the CLMT */
4113 if (fp->fptr >= fp->obj.objsize) { /* Avoid silly cache filling on the growing edge */
4119 fp->fptr < fp->obj.objsize &&
4126 wcnt = SS(fs) - (UINT)fp->fptr % SS(fs); /* Number of bytes remains in the sector */
4130 memcpy(fs->win + fp->fptr % SS(fs), wbuff, wcnt); /* Fit data to the sector */
4133 memcpy(fp->buf + fp->fptr % SS(fs), wbuff, wcnt); /* Fit data to the sector */
4502 fp->fptr = ofs; /* Set file pointer */
4508 if (fp->fptr % SS(fs) && dsc != fp->sect) { /* Refill sector cache if needed */
4533 ifptr = fp->fptr;
4534 fp->fptr = nsect = 0;
4539 fp->fptr = (ifptr - 1) & ~(FSIZE_t)(bcs - 1); /* start from the current cluster */
4540 ofs -= fp->fptr;
4556 ofs -= bcs; fp->fptr += bcs;
4559 …if (FF_FS_EXFAT && fp->fptr > fp->obj.objsize) { /* No FAT chain object needs correct objsize to g…
4560 fp->obj.objsize = fp->fptr;
4576 fp->fptr += ofs;
4584 …if (!FF_FS_READONLY && fp->fptr > fp->obj.objsize) { /* Set file change flag if the file size is e…
4585 fp->obj.objsize = fp->fptr;
4588 if (fp->fptr % SS(fs) && nsect != fp->sect) { /* Fill sector cache if needed */
4940 if (fp->fptr < fp->obj.objsize) { /* Process when fptr is not on the eof */
4941 if (fp->fptr == 0) { /* When set file size to zero, remove entire cluster chain */
4953 fp->obj.objsize = fp->fptr; /* Set file size to current read/write point */
5700 remain = fp->obj.objsize - fp->fptr;
5703 …for ( ; btf > 0 && (*func)(0, 0); fp->fptr += rcnt, *bf += rcnt, btf -= rcnt) { /* Repeat until al…
5704 csect = (UINT)(fp->fptr / SS(fs) & (fs->csize - 1)); /* Sector offset in the cluster */
5705 if (fp->fptr % SS(fs) == 0) { /* On the sector boundary? */
5707 clst = (fp->fptr == 0) ? /* On the top of the file? */
5733 rcnt = SS(fs) - (UINT)fp->fptr % SS(fs); /* Number of bytes remains in the sector */
5735 rcnt = (*func)(dbuf + ((UINT)fp->fptr % SS(fs)), rcnt); /* Forward the file data */