Re: Programming in standard c
- From: jacob navia <jacob@xxxxxxxxxx>
- Date: Thu, 27 Dec 2007 23:01:25 +0100
user923005 wrote:
Here is a machine (HP RX/1600 Itanium running OpenVMS) that reports
its file sizes in blocks.
[big snip]
Total of 28 files, 4404 blocks.
Next Cmd:
each of those file sizes is 512 byte increments. You can buy a new
one today from HP, if you want.
http://h71000.www7.hp.com/openvms/hw_supportchart.html
If you have one of that systems and your trash is full so you can't get
rid of it, then you can do the following
http://h71000.www7.hp.com/wizard/wiz_5424.html
Obtaining RMS file size?
Hello Mr Wizard
I am looking for a method of obtaining the size of a file, NOT the allocation
from within a Fortran routine. I thought this would be a simple trivial task
but alas I am proved wrong.
Can you help.
Regards Jim
Answer
RMS does NOT keep track of the number of user data bytes in a file.
The only reliable way to obtain that, is to read the file and count!
So there you have the answer!
If you are using that system expect that filesize() will take some time.
So What?
Should we ALL suffer because some brain-dead system exists somewhere?
No.
Only the users of THAT system should be the ones of coping with their
choices not all others!
The fact that sizes are not reported in bytes on some systems is not
nearly so large a hurdle as the fact that on live systems file sizes
are constantly changing.
The function returns the size AT THE TIME OF THE CALL. I have repeated
this AGAIN AND AGAIN and I am repeating here AGAIN:
"AT THE TIME OF THE CALL"
If the file size changes later IT IS NOT THE PROBLEM OF THE API!
You are proposing a function that cannot
possibly work (reporting file size on a live file). It's not an
intelligent API.
If you say that because it takes a file pointer the file is "live"
that's another question. Maybe it would better be a file NAME and not a handle to a file.
What is important is that we can use a portable function in MOST file
systems. I am tired of this levelling through the worst that is going on
here.
This insistence of getting the WORST system then FORCING all other
people to adapt themselves to that pile of sh...!
CP/M, it is DEAD.
OpenVMS? It is dying.
Anyway, I always avoided the VAX, and I am glad I did!
--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
.
- Follow-Ups:
- Re: Programming in standard c
- From: Randy Howard
- Re: Programming in standard c
- From: vippstar
- Re: Programming in standard c
- From: Walter Roberson
- Re: Programming in standard c
- From: Richard Heathfield
- Re: Programming in standard c
- From: user923005
- Re: Programming in standard c
- References:
- Programming in standard c
- From: jacob navia
- Re: Programming in standard c
- From: jameskuyper
- Re: Programming in standard c
- From: jacob navia
- Re: Programming in standard c
- From: Erik Trulsson
- Re: Programming in standard c
- From: jacob navia
- Re: Programming in standard c
- From: user923005
- Programming in standard c
- Prev by Date: Re: Programming in standard c
- Next by Date: Re: Programming in standard c
- Previous by thread: Re: Programming in standard c
- Next by thread: Re: Programming in standard c
- Index(es):