Skip to content

Kill r_cons_gprintf #26337

Description

@trufae

This must be removed before 6.2.0 release. its a bad api using global variables and it was there just for transitional reasons. the apis using them will need refactoring, or redesigning to have access to an RCons pointer

libr/cons/cons.c:R_API int r_cons_gprintf(const char *format, ...) {
libr/cons/stiv.c:	do_render (renderer, r_cons_gprintf, buf, bufsz, width, height, components);
libr/core/cbin.c:	pdb.cb_printf = r_cons_gprintf;
libr/core/core.c:	core->anal->cb_printf = (void *)r_cons_gprintf;
libr/core/core.c:	core->bin->cb_printf = (PrintfCallback)r_cons_gprintf;
libr/core/core.c:	core->io->cb_printf = r_cons_gprintf;
libr/core/core.c:	core->dbg->cb_printf = r_cons_gprintf;
libr/include/r_cons.h:R_API int r_cons_gprintf(const char *format, ...) R_PRINTF_CHECK(1, 2);
libr/include/r_heap_glibc.h:#define PRINTF_A(color, fmt , ...) r_cons_gprintf (color fmt Color_RESET, __VA_ARGS__)
libr/include/r_heap_glibc.h:#define PRINT_YA(msg) r_cons_gprintf ("%s" msg Color_RESET, pal->addr)
libr/include/r_heap_glibc.h:#define PRINT_GA(msg) r_cons_gprintf ("%s" msg Color_RESET, pal->args)
libr/include/r_heap_glibc.h:#define PRINT_BA(msg) r_cons_gprintf ("%s" msg Color_RESET, pal->num)
libr/include/r_heap_glibc.h:#define PRINT_RA(msg) r_cons_gprintf ("%s" msg Color_RESET, pal->invalid)
libr/include/r_heap_jemalloc.h:#define PRINTF_A(color, fmt , ...) r_cons_gprintf (color fmt Color_RESET, __VA_ARGS__)
libr/include/r_heap_jemalloc.h:#define PRINT_YA(msg) r_cons_gprintf ("%s" msg Color_RESET, pal->addr)
libr/include/r_heap_jemalloc.h:#define PRINT_GA(msg) r_cons_gprintf ("%s" msg Color_RESET, pal->args)
libr/include/r_heap_jemalloc.h:#define PRINT_BA(msg) r_cons_gprintf ("%s" msg Color_RESET, pal->num)
libr/include/r_heap_jemalloc.h:#define PRINT_RA(msg) r_cons_gprintf ("%s" msg Color_RESET, pal->invalid)
libr/lang/p/spp_r2.inc.c:		r_cons_gprintf ("%s", var);
libr/lang/p/spp_r2.inc.c:	r_cons_gprintf ("%d", max);
libr/lang/p/spp_r2.inc.c:		r_cons_gprintf ("%s", buf);
libr/main/rabin2.c:	bin->cb_printf = r_cons_gprintf; // XXX deprecate
test/unit/test_pdb.c:	pdb->cb_printf = r_cons_gprintf;
test/unit/test_pdb.c:	pdb->cb_printf = r_cons_gprintf;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions