Rizin
unix-like reverse engineering framework and cli tools
acr.h
Go to the documentation of this file.
1 /* CPP */
2 
3 static char *pkgname = NULL;
4 static char *version = NULL;
5 static char **slurp_ptr = NULL;
6 
7 static int slurp_args(char *buf) {
8  if (slurp_ptr) {
9  *slurp_ptr = strdup (buf);
10  slurp_ptr = NULL;
11  return 1;
12  }
13  return 0;
14 }
15 
16 static TAG_CALLBACK(acr_default) {
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 }
28 
29 static TAG_CALLBACK(acr_eof) {
30  printf ("Report:\n pkgname: %s\n version: %s\n", pkgname, version);
31  return 0;
32 }
33 
34 DLL_LOCAL struct Tag acr_tags[] = {
35  { NULL, acr_default },
36  { NULL }
37 };
38 
39 DLL_LOCAL struct Arg acr_args[] = {
40  { NULL }
41 };
42 
44  .name = "acr",
45  .tags = (struct Tag **)acr_tags,
46  .args = (struct Arg **)acr_args,
47  .token = " ",
48  .eof = &acr_eof,
49  .tag_pre = NULL,
50  .tag_post = NULL,
51  .multiline = NULL,
52  .default_echo = 1,
53  .chop = 0,
54  .tag_begin = 0,
55 };
static char ** slurp_ptr
Definition: acr.h:5
static char * pkgname
Definition: acr.h:3
DLL_LOCAL struct Arg acr_args[]
Definition: acr.h:39
static char * version
Definition: acr.h:4
DLL_LOCAL struct Proc acr_proc
Definition: acr.h:43
static TAG_CALLBACK(acr_default)
Definition: acr.h:16
DLL_LOCAL struct Tag acr_tags[]
Definition: acr.h:34
static int slurp_args(char *buf)
Definition: acr.h:7
#define NULL
Definition: cris-opc.c:27
_Use_decl_annotations_ int __cdecl printf(const char *const _Format,...)
Definition: cs_driver.c:93
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")
int args
Definition: mipsasm.c:18
#define DLL_LOCAL
Definition: spp.h:69
Definition: spp.h:121
Definition: spp.h:128
const char * name
Definition: spp.h:129
Definition: spp.h:116