Displaying 7 results from an estimated 7 matches for "file_seek".
2005 May 28
1
(PR#7899) seek(con, 0, "end", rw="r") does not always work
...plate@blackmesacapital.com wrote:
>>
>>
>>> I've noticed that seek(con, 0, "end", rw="r") on a file connection
>>> does not always work correctly after a write (R 2.1.0 on Windows).
>>>
>>> [Is a call to fflush() needed inside file_seek() in main/connections.c?]
>>
>>
>>
>>
>> If you have an idea where to fflush() precisely and your patch works,
>> please tell it! I'll happily run some test cases where seeking matters.
>>
>
> I couldn't see why the current code was returnin...
2005 May 27
0
seek(con, 0, "end", rw="r") does not always work correctly (PR#7901)
...dortmund.de wrote:
> tplate@blackmesacapital.com wrote:
>
>
>>I've noticed that seek(con, 0, "end", rw="r") on a file connection does
>>not always work correctly after a write (R 2.1.0 on Windows).
>>
>>[Is a call to fflush() needed inside file_seek() in main/connections.c?]
>
>
>
> If you have an idea where to fflush() precisely and your patch works,
> please tell it! I'll happily run some test cases where seeking matters.
>
I couldn't see why the current code was returning a bad value under some
conditions....
2005 May 19
0
problems with truncate() with files > 2Gb under Windows (PR#7880)
...#define f_tell ftello
#else
#ifdef Win32
#define f_seek fseeko64
#define f_tell ftello64
#else
#define f_seek fseek
#define f_tell ftell
#endif
#endif
Windows support for > 2Gb files seemed flaky, but we did not think it was
R's job to report OS deficiencies.
I've now used off64_t in file_seek under Windows.
On Thu, 19 May 2005 tplate@blackmesacapital.com wrote:
> This message relates to handling files > 2Gb under Windows. (I use 2Gb
> as shorthand for 2^31-1 -- the largest integer representable in a signed
> 32 bit integer.)
>
> First issue: truncate() is not able t...
2005 May 19
1
problems with truncate() with files > 2Gb under Windows (possibly (PR#7879)
...strange (incorrect) return values from seek(), though
otherwise not affecting correct operation.
Inspecting the code, I wonder whether the lines
#if defined(HAVE_OFF_T) && defined(__USE_LARGEFILE)
off_t pos = f_tell(fp);
#else
long pos = f_tell(fp);
#endif
in the definition of file_seek() in main/connections.c should be more
along the lines of the code defining struct fileconn in
include/Rconnections.h:
#if defined(HAVE_OFF_T) && defined(__USE_LARGEFILE)
off_t rpos, wpos;
#else
#ifdef Win32
off64_t rpos, wpos;
#else
long rpos, wpos;
#endif
#endif
I compile...
2004 May 23
4
Various Ogg Vorbis largefile notes and/or patches
Greetings one and all;
I'm not subscribed to this list so I'm first sending this message
to verify that mails from me make it through, and then later I'll
send the juicy messages with patches. Also, the address I'm using
is IPv6-only and doesn't often work, so drop me from any replies
and I'll catch the archives, or drop only the hostname part to get
an IPv4 address that
2005 May 25
0
seek(con, 0, "end", rw="r") does not always work correctly (PR#7896)
I've noticed that seek(con, 0, "end", rw="r") on a file connection does
not always work correctly after a write (R 2.1.0 on Windows).
[Is a call to fflush() needed inside file_seek() in main/connections.c?]
Example (see the lines with the "***WRONG***" comment)
> # seek(, rw="r") on a file does not always work correctly after a write
> f <- file("tmp3.txt", "w+b")
> # Write something earlier in the file
> seek(f, 10...
2005 May 26
0
seek(con, 0, "end", rw="r") does not always work correctly (PR#7899)
tplate@blackmesacapital.com wrote:
> I've noticed that seek(con, 0, "end", rw="r") on a file connection does
> not always work correctly after a write (R 2.1.0 on Windows).
>
> [Is a call to fflush() needed inside file_seek() in main/connections.c?]
If you have an idea where to fflush() precisely and your patch works,
please tell it! I'll happily run some test cases where seeking matters.
Note that ?seek currently tells us "The value returned by seek(where=NA)
appears to be unreliable on Windows systems,...