- if (fseek (inf, 0L, SEEK_END))
- {
- fprintf (stderr, "%s: cannot seek in %s:%s\n",
- prog, arg, strerror (errno));
- exit (1);
- }
- file_size = ftell (inf);
- if (fseek (inf, 0L, SEEK_SET))
- {
- fprintf (stderr, "%s: cannot seek in %s:%s\n",
- prog, arg, strerror (errno));
- exit (1);
- }
- buf = xmalloc (file_size);
- if (!buf)
- {
- fprintf (stderr, "%s: cannot xmalloc: %s\n",
- prog, strerror (errno));
- exit (1);
- }
- if (fread (buf, 1, file_size, inf) != file_size)
- {
- fprintf (stderr, "%s: cannot read %s: %s\n",
- prog, arg, strerror (errno));
- exit (1);
- }
- while ((ret = marc_display_ex (buf, stdout, verbose)) > 0)