Lines Matching refs:fptr

3565             fp->fptr = 0;           /* Set file pointer top of the file */
3571 fp->fptr = fp->obj.objsize; /* Offset to seek */
3628 remain = fp->obj.objsize - fp->fptr;
3632 btr -= rcnt, *br += rcnt, rbuff += rcnt, fp->fptr += rcnt) {
3633 if (fp->fptr % SS(fs) == 0) { /* On the sector boundary? */
3634 … csect = (UINT)(fp->fptr / SS(fs) & (fs->csize - 1)); /* Sector offset in the cluster */
3636 if (fp->fptr == 0) { /* On the top of the file? */
3641 clst = clmt_clust(fp, fp->fptr); /* Get cluster# from the CLMT */
3688 rcnt = SS(fs) - (UINT)fp->fptr % SS(fs); /* Number of bytes left in the sector */
3692 mem_cpy(rbuff, fs->win + fp->fptr % SS(fs), rcnt); /* Extract partial sector */
3694 mem_cpy(rbuff, fp->buf + fp->fptr % SS(fs), rcnt); /* Extract partial sector */
3729 if ((!FF_FS_EXFAT || fs->fs_type != FS_EXFAT) && (DWORD)(fp->fptr + btw) < (DWORD)fp->fptr) {
3730 btw = (UINT)(0xFFFFFFFF - (DWORD)fp->fptr);
3734 …-= wcnt, *bw += wcnt, wbuff += wcnt, fp->fptr += wcnt, fp->obj.objsize = (fp->fptr > fp->obj.objsi…
3735 if (fp->fptr % SS(fs) == 0) { /* On the sector boundary? */
3736 … csect = (UINT)(fp->fptr / SS(fs)) & (fs->csize - 1); /* Sector offset in the cluster */
3738 if (fp->fptr == 0) { /* On the top of the file? */
3746 clst = clmt_clust(fp, fp->fptr); /* Get cluster# from the CLMT */
3793 if (fp->fptr >= fp->obj.objsize) { /* Avoid silly cache filling on the growing edge */
3799 fp->fptr < fp->obj.objsize &&
3806 wcnt = SS(fs) - (UINT)fp->fptr % SS(fs); /* Number of bytes left in the sector */
3810 mem_cpy(fs->win + fp->fptr % SS(fs), wbuff, wcnt); /* Fit data to the sector */
3813 mem_cpy(fp->buf + fp->fptr % SS(fs), wbuff, wcnt); /* Fit data to the sector */
4160 fp->fptr = ofs; /* Set file pointer */
4166 if (fp->fptr % SS(fs) && dsc != fp->sect) { /* Refill sector cache if needed */
4191 ifptr = fp->fptr;
4192 fp->fptr = nsect = 0;
4197 fp->fptr = (ifptr - 1) & ~(FSIZE_t)(bcs - 1); /* start from the current cluster */
4198 ofs -= fp->fptr;
4214 ofs -= bcs; fp->fptr += bcs;
4217 …if (FF_FS_EXFAT && fp->fptr > fp->obj.objsize) { /* No FAT chain object needs correct objsize t…
4218 fp->obj.objsize = fp->fptr;
4234 fp->fptr += ofs;
4242 …if (!FF_FS_READONLY && fp->fptr > fp->obj.objsize) { /* Set file change flag if the file size i…
4243 fp->obj.objsize = fp->fptr;
4246 if (fp->fptr % SS(fs) && nsect != fp->sect) { /* Fill sector cache if needed */
4590 if (fp->fptr < fp->obj.objsize) { /* Process when fptr is not on the eof */
4591 if (fp->fptr == 0) { /* When set file size to zero, remove entire cluster chain */
4603 fp->obj.objsize = fp->fptr; /* Set file size to current read/write point */
5332 remain = fp->obj.objsize - fp->fptr;
5336 fp->fptr += rcnt, *bf += rcnt, btf -= rcnt) {
5337 csect = (UINT)(fp->fptr / SS(fs) & (fs->csize - 1)); /* Sector offset in the cluster */
5338 if (fp->fptr % SS(fs) == 0) { /* On the sector boundary? */
5340 clst = (fp->fptr == 0) ? /* On the top of the file? */
5366 rcnt = SS(fs) - (UINT)fp->fptr % SS(fs); /* Number of bytes left in the sector */
5368 rcnt = (*func)(dbuf + ((UINT)fp->fptr % SS(fs)), rcnt); /* Forward the file data */