blob: e0a64c2d817b00ea6a26d8a1004d5b103e8e2601 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
/* libxelf - helper functions
*
* by scut / teso
*/
#include <stdio.h>
#include <stdarg.h>
#include <elf_file.h>
#include <elf_util.h>
void
elf_error (elf_file *elf, const char *str, ...)
{
va_list vl;
if (elf == NULL || elf->pathname == NULL) {
fprintf (stderr, "?: ");
} else {
fprintf (stderr, "%s: ", elf->pathname);
}
va_start (vl, str);
vfprintf (stderr, str, vl);
va_end (vl);
fprintf (stderr, "\n");
return;
}
|