[comp.lang.c] File input problem

KINGLEON%HUMBER.BITNET@wiscvm.wisc.EDU (Leon King) (06/28/87)

Frustrating problem with code that worked before:

I'm using VAX C on a 750.  I'm trying to read in a sequential file with
varying length records, maximum  size 3600.  The first 5 records are 360
bytes, the next 12 are 1800 (until byte 21632) and 3600 bytes per record
thereafter.  File attribute is carriage control.
I open the file as follows

           fopen(landsat,"landsat.fil","r")

and use    fread(buffer,1,3800,landsat)

Problem: Past byte 1800 nothing will be read in.  fread returns a
         bytecount of zero.  The contents of the file are there,
         (verified using DUMP) but I can't seem to get at it.

Any insights??

===============================================================================
Q: How many programmers does it take to change a lightbulb?
A: 3.  It really only takes one to change the bulb, but two of them
   will probably leave in the middle of the project.