r_8051_disas should not be exported (#15347)

This commit is contained in:
Riccardo Schirone 2019-10-24 13:14:05 +02:00 committed by radare
parent dd3ad6d660
commit 05df48a96c
5 changed files with 3 additions and 13 deletions

View File

@ -7,7 +7,6 @@
#include <r_anal.h>
#include <8051_ops.h>
// #include <8051_disas.h>
#include "../asm/arch/8051/8051_disas.c"
typedef struct {

View File

@ -5,7 +5,6 @@
#include <string.h>
#include "8051_ops.h"
#include "8051_disas.h"
static const char *_8051_regs[] = {
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", // 0x00
@ -62,8 +61,7 @@ static char* _replace_register(char* disasm, ut8 arg, ut8 val) {
return disasm;
}
// int r_8051_disas(ut64 pc, RAsmOp *op, const ut8 *buf, ut64 len) {
R_API char *r_8051_disas(ut64 pc, const ut8 *buf, int len, int *olen) {
static char *r_8051_disas(ut64 pc, const ut8 *buf, int len, int *olen) {
int i = 0;
while (_8051_ops[i].string && _8051_ops[i].op != (buf[0] & ~_8051_ops[i].mask)) {
i++;

View File

@ -1,7 +0,0 @@
#ifndef R2_8051_DISAS_H
#define R2_8051_DISAS_H
// R_API int r_8051_disas (ut64 pc, RAsmOp *op, const ut8 *buf, ut64 len);
R_API char *r_8051_disas(ut64 pc, const ut8 *buf, int len, int *olen);
#endif

View File

@ -71,7 +71,7 @@ r_asm_sources = [
'p/asm_z80.c',
#'arch/6502/6502dis.c',
'arch/amd29k/amd29k.c',
'arch/8051/8051_disas.c',
#'arch/8051/8051_disas.c',
'arch/8051/8051_ass.c',
'arch/arc/gnu/arc-dis.c',
'arch/arc/gnu/arc-ext.c',

View File

@ -8,8 +8,8 @@
#include <r_lib.h>
#include <r_asm.h>
#include <8051_disas.h>
#include <8051_ass.h>
#include "../arch/8051/8051_disas.c"
static int disassemble(RAsm *a, RAsmOp *op, const ut8 *buf, int len) {
int dlen = 0;