70 |
static int |
static int |
71 |
corrupt_msg (struct pfm_reader *r, const char *format, ...) |
corrupt_msg (struct pfm_reader *r, const char *format, ...) |
72 |
{ |
{ |
73 |
char buf[1024]; |
char *title; |
74 |
|
struct error e; |
75 |
{ |
const char *filename; |
76 |
va_list args; |
va_list args; |
77 |
|
|
78 |
va_start (args, format); |
e.class = ME; |
79 |
vsnprintf (buf, 1024, format, args); |
getl_location (&e.where.filename, &e.where.line_number); |
80 |
va_end (args); |
filename = handle_get_filename (r->fh); |
81 |
} |
e.title = title = local_alloc (strlen (filename) + 80); |
82 |
|
sprintf (title, _("portable file %s corrupt at offset %ld: "), |
83 |
{ |
filename, ftell (r->file) - (82 - (long) (r->bp - r->buf))); |
|
char *title; |
|
|
struct error e; |
|
|
const char *filename; |
|
84 |
|
|
85 |
e.class = ME; |
va_start (args, format); |
86 |
getl_location (&e.where.filename, &e.where.line_number); |
err_vmsg (&e, format, args); |
87 |
filename = handle_get_filename (r->fh); |
va_end (args); |
|
e.title = title = local_alloc (strlen (filename) + 80); |
|
|
sprintf (title, _("portable file %s corrupt at offset %ld: "), |
|
|
filename, ftell (r->file) - (82 - (long) (r->bp - r->buf))); |
|
|
e.text = buf; |
|
88 |
|
|
89 |
err_vmsg (&e); |
local_free (title); |
90 |
|
|
|
local_free (title); |
|
|
} |
|
|
|
|
91 |
return 0; |
return 0; |
92 |
} |
} |
93 |
|
|