+ Error ("Cannot open `%s': %s", Name, strerror (errno));
+ }
+
+ /* Seek to the end to get the size of the file */
+ if (fseek (F, 0, SEEK_END) != 0) {
+ Error ("Cannot seek on file `%s': %s", Name, strerror (errno));
+ }
+ Size = ftell (F);
+ rewind (F);
+
+ /* Check if the size is larger than what we can read */
+ if (Size == 0) {
+ Error ("File `%s' contains no data", Name);
+ }
+ if (Size > MaxCount) {
+ Warning ("File `%s' is too large, ignoring %ld bytes",
+ Name, Size - MaxCount);
+ } else if (MaxCount > Size) {
+ MaxCount = (unsigned) Size;