Rizin
unix-like reverse engineering framework and cli tools
acr.h File Reference

Go to the source code of this file.

Functions

static int slurp_args (char *buf)
 
static TAG_CALLBACK (acr_default)
 
static TAG_CALLBACK (acr_eof)
 

Variables

static char * pkgname = NULL
 
static char * version = NULL
 
static char ** slurp_ptr = NULL
 
DLL_LOCAL struct Tag acr_tags []
 
DLL_LOCAL struct Arg acr_args []
 
DLL_LOCAL struct Proc acr_proc
 

Function Documentation

◆ slurp_args()

static int slurp_args ( char *  buf)
static

Definition at line 7 of file acr.h.

7  {
8  if (slurp_ptr) {
9  *slurp_ptr = strdup (buf);
10  slurp_ptr = NULL;
11  return 1;
12  }
13  return 0;
14 }
static char ** slurp_ptr
Definition: acr.h:5
#define NULL
Definition: cris-opc.c:27
voidpf void * buf
Definition: ioapi.h:138
return strdup("=SP r13\n" "=LR r14\n" "=PC r15\n" "=A0 r0\n" "=A1 r1\n" "=A2 r2\n" "=A3 r3\n" "=ZF zf\n" "=SF nf\n" "=OF vf\n" "=CF cf\n" "=SN or0\n" "gpr lr .32 56 0\n" "gpr pc .32 60 0\n" "gpr cpsr .32 64 0 ____tfiae_________________qvczn\n" "gpr or0 .32 68 0\n" "gpr tf .1 64.5 0 thumb\n" "gpr ef .1 64.9 0 endian\n" "gpr jf .1 64.24 0 java\n" "gpr qf .1 64.27 0 sticky_overflow\n" "gpr vf .1 64.28 0 overflow\n" "gpr cf .1 64.29 0 carry\n" "gpr zf .1 64.30 0 zero\n" "gpr nf .1 64.31 0 negative\n" "gpr itc .4 64.10 0 if_then_count\n" "gpr gef .4 64.16 0 great_or_equal\n" "gpr r0 .32 0 0\n" "gpr r1 .32 4 0\n" "gpr r2 .32 8 0\n" "gpr r3 .32 12 0\n" "gpr r4 .32 16 0\n" "gpr r5 .32 20 0\n" "gpr r6 .32 24 0\n" "gpr r7 .32 28 0\n" "gpr r8 .32 32 0\n" "gpr r9 .32 36 0\n" "gpr r10 .32 40 0\n" "gpr r11 .32 44 0\n" "gpr r12 .32 48 0\n" "gpr r13 .32 52 0\n" "gpr r14 .32 56 0\n" "gpr r15 .32 60 0\n" "gpr r16 .32 64 0\n" "gpr r17 .32 68 0\n")

References NULL, slurp_ptr, and strdup().

Referenced by TAG_CALLBACK().

◆ TAG_CALLBACK() [1/2]

static TAG_CALLBACK ( acr_default  )
static

Definition at line 16 of file acr.h.

16  {
17  //printf("acr keyword(%s)\n", buf);
18  if (slurp_args (buf)) {
19  return 0;
20  }
21  if (!strcmp (buf, "PKGNAME")) {
22  slurp_ptr = &pkgname;
23  } else if (!strcmp (buf, "VERSION")) {
24  slurp_ptr = &version;
25  }
26  return 0;
27 }
static char * pkgname
Definition: acr.h:3
static char * version
Definition: acr.h:4
static int slurp_args(char *buf)
Definition: acr.h:7

References pkgname, slurp_args(), slurp_ptr, and version.

◆ TAG_CALLBACK() [2/2]

static TAG_CALLBACK ( acr_eof  )
static

Definition at line 29 of file acr.h.

29  {
30  printf ("Report:\n pkgname: %s\n version: %s\n", pkgname, version);
31  return 0;
32 }
_Use_decl_annotations_ int __cdecl printf(const char *const _Format,...)
Definition: cs_driver.c:93

References pkgname, and printf().

Variable Documentation

◆ acr_args

DLL_LOCAL struct Arg acr_args[]
Initial value:
= {
{ NULL }
}

Definition at line 39 of file acr.h.

◆ acr_proc

DLL_LOCAL struct Proc acr_proc
Initial value:
= {
.name = "acr",
.tags = (struct Tag **)acr_tags,
.args = (struct Arg **)acr_args,
.token = " ",
.eof = &acr_eof,
.tag_pre = NULL,
.tag_post = NULL,
.multiline = NULL,
.default_echo = 1,
.chop = 0,
.tag_begin = 0,
}
DLL_LOCAL struct Arg acr_args[]
Definition: acr.h:39
DLL_LOCAL struct Tag acr_tags[]
Definition: acr.h:34
int args
Definition: mipsasm.c:18
Definition: spp.h:121
Definition: spp.h:116

Definition at line 43 of file acr.h.

◆ acr_tags

DLL_LOCAL struct Tag acr_tags[]
Initial value:
= {
{ NULL, acr_default },
{ NULL }
}

Definition at line 34 of file acr.h.

◆ pkgname

char* pkgname = NULL
static

Definition at line 3 of file acr.h.

Referenced by TAG_CALLBACK().

◆ slurp_ptr

char** slurp_ptr = NULL
static

Definition at line 5 of file acr.h.

Referenced by slurp_args(), and TAG_CALLBACK().

◆ version