Functions
utils.c File Reference
#include <stdlib.h>
#include <string.h>
#include "utils.h"
Include dependency graph for utils.c:

Go to the source code of this file.

Functions

bool arr_exist (uint16_t *arr, unsigned char max, unsigned int id)
 
bool arr_exist8 (unsigned char *arr, unsigned char max, unsigned int id)
 
unsigned int count_positive (const uint16_t *list)
 
unsigned int count_positive8 (const unsigned char *list)
 
int cs_snprintf (char *buffer, size_t size, const char *fmt,...)
 
char * cs_strdup (const char *str)
 
const char * id2name (const name_map *map, int max, const unsigned int id)
 
unsigned short insn_find (const insn_map *insns, unsigned int max, unsigned int id, unsigned short **cache)
 
static unsigned short * make_id2insn (const insn_map *insns, unsigned int size)
 
int name2id (const name_map *map, int max, const char *name)
 

Function Documentation

◆ arr_exist()

bool arr_exist ( uint16_t arr,
unsigned char  max,
unsigned int  id 
)

Definition at line 128 of file utils.c.

◆ arr_exist8()

bool arr_exist8 ( unsigned char *  arr,
unsigned char  max,
unsigned int  id 
)

Definition at line 116 of file utils.c.

◆ count_positive()

unsigned int count_positive ( const uint16_t list)

Definition at line 72 of file utils.c.

◆ count_positive8()

unsigned int count_positive8 ( const unsigned char *  list)

Definition at line 83 of file utils.c.

◆ cs_snprintf()

int cs_snprintf ( char *  buffer,
size_t  size,
const char *  fmt,
  ... 
)

Definition at line 104 of file utils.c.

◆ cs_strdup()

char* cs_strdup ( const char *  str)

Definition at line 92 of file utils.c.

◆ id2name()

const char* id2name ( const name_map map,
int  max,
const unsigned int  id 
)

Definition at line 56 of file utils.c.

◆ insn_find()

unsigned short insn_find ( const insn_map insns,
unsigned int  max,
unsigned int  id,
unsigned short **  cache 
)

Definition at line 31 of file utils.c.

◆ make_id2insn()

static unsigned short* make_id2insn ( const insn_map insns,
unsigned int  size 
)
static

Definition at line 15 of file utils.c.

◆ name2id()

int name2id ( const name_map map,
int  max,
const char *  name 
)

Definition at line 42 of file utils.c.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:37