[PLUG] C question...

Fred James fredjame at fredjame.cnc.net
Sat Feb 27 01:46:26 UTC 2010


Michael Robinson wrote:
> I'm trying to write a simple C program to open a text file with
> temperature data in it, extract the highest, the lowest, and the
> last temperature, and write that information to another text file.
>
> How in C do I verify that the files I'm working with are text files?
> Specifically since I don't allow clobbering, I'm worried about the 
> input file.
>
> I'm thinking there is a UNIX file command which I should be able 
> to call from inside the C program, but is there a better way?
>   
Michael Robinson
Will fopen() open a non-text file?
Regards
Fred James




More information about the PLUG mailing list