]>
git.saurik.com Git - apt.git/blob - test/interactive-helper/libnoprofile.c
2cba6dc8b2a881203de9e463666834da145ab3fa
9 int vprintf(const char *format
, va_list ap
) {
10 static int (*func_fprintf
)(const char *format
, va_list ap
) = NULL
;
11 if (func_fprintf
== NULL
)
12 func_fprintf
= (int (*) (const char *format
, va_list ap
)) dlsym(RTLD_NEXT
, "vprintf");
16 if (strncmp(format
, "profiling:", strlen("profiling:")) == 0)
18 int res
= func_fprintf(format
, ap2
);
22 int printf(const char *format
, ...) {
25 int res
= vprintf(format
, ap
);
30 int vfprintf(FILE *stream
, const char *format
, va_list ap
) {
31 static int (*func_vfprintf
)(FILE *stream
, const char *format
, va_list ap
) = NULL
;
32 if (func_vfprintf
== NULL
)
33 func_vfprintf
= (int (*) (FILE *stream
, const char *format
, va_list ap
)) dlsym(RTLD_NEXT
, "vfprintf");
37 if (strncmp(format
, "profiling:", strlen("profiling:")) == 0)
39 int res
= func_vfprintf(stream
, format
, ap2
);
44 int fprintf(FILE *stream
, const char *format
, ...) {
47 int res
= vfprintf(stream
, format
, ap
);