Lines Matching refs:fptr

3693 			fp->fptr = 0;			/* Set file pointer top of the file */
3699 fp->fptr = fp->obj.objsize; /* Offset to seek */
3756 remain = fp->obj.objsize - fp->fptr;
3760 btr -= rcnt, *br += rcnt, rbuff += rcnt, fp->fptr += rcnt) {
3761 if (fp->fptr % SS(fs) == 0) { /* On the sector boundary? */
3762 csect = (UINT)(fp->fptr / SS(fs) & (fs->csize - 1)); /* Sector offset in the cluster */
3764 if (fp->fptr == 0) { /* On the top of the file? */
3769 clst = clmt_clust(fp, fp->fptr); /* Get cluster# from the CLMT */
3816 rcnt = SS(fs) - (UINT)fp->fptr % SS(fs); /* Number of bytes left in the sector */
3820 mem_cpy(rbuff, fs->win + fp->fptr % SS(fs), rcnt); /* Extract partial sector */
3822 mem_cpy(rbuff, fp->buf + fp->fptr % SS(fs), rcnt); /* Extract partial sector */
3857 if ((!FF_FS_EXFAT || fs->fs_type != FS_EXFAT) && (DWORD)(fp->fptr + btw) < (DWORD)fp->fptr) {
3858 btw = (UINT)(0xFFFFFFFF - (DWORD)fp->fptr);
3862 …-= wcnt, *bw += wcnt, wbuff += wcnt, fp->fptr += wcnt, fp->obj.objsize = (fp->fptr > fp->obj.objsi…
3863 if (fp->fptr % SS(fs) == 0) { /* On the sector boundary? */
3864 csect = (UINT)(fp->fptr / SS(fs)) & (fs->csize - 1); /* Sector offset in the cluster */
3866 if (fp->fptr == 0) { /* On the top of the file? */
3874 clst = clmt_clust(fp, fp->fptr); /* Get cluster# from the CLMT */
3921 if (fp->fptr >= fp->obj.objsize) { /* Avoid silly cache filling on the growing edge */
3927 fp->fptr < fp->obj.objsize &&
3934 wcnt = SS(fs) - (UINT)fp->fptr % SS(fs); /* Number of bytes left in the sector */
3938 mem_cpy(fs->win + fp->fptr % SS(fs), wbuff, wcnt); /* Fit data to the sector */
3941 mem_cpy(fp->buf + fp->fptr % SS(fs), wbuff, wcnt); /* Fit data to the sector */
4305 fp->fptr = ofs; /* Set file pointer */
4311 if (fp->fptr % SS(fs) && dsc != fp->sect) { /* Refill sector cache if needed */
4336 ifptr = fp->fptr;
4337 fp->fptr = nsect = 0;
4342 fp->fptr = (ifptr - 1) & ~(FSIZE_t)(bcs - 1); /* start from the current cluster */
4343 ofs -= fp->fptr;
4359 ofs -= bcs; fp->fptr += bcs;
4362 …if (FF_FS_EXFAT && fp->fptr > fp->obj.objsize) { /* No FAT chain object needs correct objsize to g…
4363 fp->obj.objsize = fp->fptr;
4379 fp->fptr += ofs;
4387 …if (!FF_FS_READONLY && fp->fptr > fp->obj.objsize) { /* Set file change flag if the file size is e…
4388 fp->obj.objsize = fp->fptr;
4391 if (fp->fptr % SS(fs) && nsect != fp->sect) { /* Fill sector cache if needed */
4736 if (fp->fptr < fp->obj.objsize) { /* Process when fptr is not on the eof */
4737 if (fp->fptr == 0) { /* When set file size to zero, remove entire cluster chain */
4749 fp->obj.objsize = fp->fptr; /* Set file size to current read/write point */
5480 remain = fp->obj.objsize - fp->fptr;
5484 fp->fptr += rcnt, *bf += rcnt, btf -= rcnt) {
5485 csect = (UINT)(fp->fptr / SS(fs) & (fs->csize - 1)); /* Sector offset in the cluster */
5486 if (fp->fptr % SS(fs) == 0) { /* On the sector boundary? */
5488 clst = (fp->fptr == 0) ? /* On the top of the file? */
5514 rcnt = SS(fs) - (UINT)fp->fptr % SS(fs); /* Number of bytes left in the sector */
5516 rcnt = (*func)(dbuf + ((UINT)fp->fptr % SS(fs)), rcnt); /* Forward the file data */