logo       

Re: Some design questions: msg#00060

network.bit-torrent.libtorrent

Subject: Re: Some design questions

Ken wrote:
> The following snipped (seektest.c) can be illustrate:
>
> #include <stdio.h >
>
> main()
> {
> fseek(stdout, 1024*1024, SEEK_SET);
> putchar('$');
> }
>
> compile and run as "seektest > testfile; ls -ls testfile". This will
> show the file size, as well as the amount of disk space currently
> allocated for the file.
>
>
> I tried it on Win98, it is worked!
>
> Ken

Thanks for confirming this.

You don't have older Win95, by any chance, do you?

BTW, the correct output of the "ls -ls testfile" command is similar to
either of these:

8 -rw-r----- 1 rhociung asic 1048577 Apr 28 16:00 sparseout
1032 -rw-r----- 1 rhociung asic 1048577 Apr 28 16:02 nonsparseout

The sparseout file was generated on an ext3 filesystem, while the
nonsparseout file was generated by the same OS on a FAT filesystem, then
copied to the same directory as the sparseout file.

Both of these results are correct, as they indicate a 1M+1B file was
created when fseek-ing 1M past the end of file in write mode.

Greetings,
Radu.


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise