Re: [NEWBIE] [CODE] file_length()

From: Dana Luther (dtluther@mindspring.com)
Date: 05/11/00


>err = fstat(fileno(fp), &sb);
>
>This should be portable across all systems.  I think I've used it in
>win95/98, slackware and redhat linux (roughly a year old), and probably at
>least one flavor of bsd.
>
>Sam

I also wanted to say thank you for pointing that out. I've been silently
reading
this list for a while, just trying to learn what I can and playing with the
code
just to learn how to program better.  I'd gone through the archives till I
thought
I was going to go blind trying to find the solution to ascii pfiles for
windows,
but couldn't find it.  This was the answer I was looking for, Thank you.

Since this code is more portable, would it make sense to update the
ascii pfiles patch to use it instead? It would help out newbies like myself
immensily.

Dana


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT