Classes | Macros | Typedefs | Functions | Variables
porcupine/demo/c/dr_libs/tests/common/dr_common.c File Reference
#include <strings.h>
#include <stdio.h>
#include <stdarg.h>
#include <time.h>
#include <errno.h>
#include <dirent.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <unistd.h>
#include <dlfcn.h>
#include <stddef.h>
#include <stdint.h>
Include dependency graph for porcupine/demo/c/dr_libs/tests/common/dr_common.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  dr_file_iterator
 

Macros

#define DR_FALSE   0
 
#define DR_LCG_A   48271
 
#define DR_LCG_C   0
 
#define DR_LCG_M   2147483647
 
#define DR_SIZE_MAX   0xFFFFFFFF
 
#define DR_TRUE   1
 
#define MA_HAS_STDINT
 

Typedefs

typedef dr_uint32 dr_bool32
 
typedef dr_uint8 dr_bool8
 
typedef void * dr_handle
 
typedef int16_t dr_int16
 
typedef int32_t dr_int32
 
typedef int64_t dr_int64
 
typedef int8_t dr_int8
 
typedef void(* dr_proc) (void)
 
typedef void * dr_ptr
 
typedef uint16_t dr_uint16
 
typedef uint32_t dr_uint32
 
typedef uint64_t dr_uint64
 
typedef uint8_t dr_uint8
 
typedef uintptr_t dr_uintptr
 

Functions

int dr_append_path (char *dst, size_t dstSize, const char *base, const char *other)
 
dr_bool32 dr_argv_is_set (int argc, char **argv, const char *value)
 
void dr_dlclose (dr_handle handle)
 
dr_handle dr_dlopen (const char *filename)
 
dr_proc dr_dlsym (dr_handle handle, const char *symbol)
 
const char * dr_extension (const char *path)
 
dr_bool32 dr_extension_equal (const char *path, const char *extension)
 
dr_file_iteratordr_file_iterator_begin (const char *pFolderPath, dr_file_iterator *pState)
 
void dr_file_iterator_end (dr_file_iterator *pState)
 
dr_file_iteratordr_file_iterator_next (dr_file_iterator *pState)
 
static int dr_fopen (FILE **ppFile, const char *pFilePath, const char *pOpenMode)
 
void * dr_open_and_read_file (const char *pFilePath, size_t *pFileSizeOut)
 
void * dr_open_and_read_file_with_extra_data (const char *pFilePath, size_t *pFileSizeOut, size_t extraBytes)
 
const char * dr_path_file_name (const char *path)
 
void dr_pcm_s32_to_f32 (void *dst, const void *src, dr_uint64 count)
 
void dr_pcm_s32_to_s16 (void *dst, const void *src, dr_uint64 count)
 
int dr_printf_fixed (int width, const char *const format,...)
 
int dr_printf_fixed_with_margin (int width, int margin, const char *const format,...)
 
float dr_rand_f32 ()
 
double dr_rand_f64 ()
 
float dr_rand_range_f32 (float lo, float hi)
 
int dr_rand_range_s32 (int lo, int hi)
 
dr_uint64 dr_rand_range_u64 (dr_uint64 lo, dr_uint64 hi)
 
int dr_rand_s32 ()
 
unsigned int dr_rand_u32 ()
 
dr_uint64 dr_rand_u64 ()
 
float dr_scale_to_range_f32 (float x, float lo, float hi)
 
void dr_seed (int seed)
 
int dr_strcat_s (char *dst, size_t dstSizeInBytes, const char *src)
 
int dr_strcpy_s (char *dst, size_t dstSizeInBytes, const char *src)
 
int dr_strncat_s (char *dst, size_t dstSizeInBytes, const char *src, size_t count)
 
int dr_strncpy_s (char *dst, size_t dstSizeInBytes, const char *src, size_t count)
 
double dr_timer_now ()
 
int dr_vprintf_fixed (int width, const char *const format, va_list args)
 
int dr_vprintf_fixed_with_margin (int width, int margin, const char *const format, va_list args)
 

Variables

static int g_drLCG
 

Macro Definition Documentation

◆ DR_FALSE

#define DR_FALSE   0

◆ DR_LCG_A

#define DR_LCG_A   48271

◆ DR_LCG_C

#define DR_LCG_C   0

◆ DR_LCG_M

#define DR_LCG_M   2147483647

◆ DR_SIZE_MAX

#define DR_SIZE_MAX   0xFFFFFFFF

◆ DR_TRUE

#define DR_TRUE   1

◆ MA_HAS_STDINT

#define MA_HAS_STDINT

Typedef Documentation

◆ dr_bool32

◆ dr_bool8

typedef dr_uint8 dr_bool8

◆ dr_handle

typedef void* dr_handle

◆ dr_int16

typedef int16_t dr_int16

◆ dr_int32

typedef int32_t dr_int32

◆ dr_int64

typedef int64_t dr_int64

◆ dr_int8

typedef int8_t dr_int8

◆ dr_proc

typedef void(* dr_proc) (void)

◆ dr_ptr

typedef void* dr_ptr

◆ dr_uint16

typedef uint16_t dr_uint16

◆ dr_uint32

typedef uint32_t dr_uint32

◆ dr_uint64

typedef uint64_t dr_uint64

◆ dr_uint8

typedef uint8_t dr_uint8

◆ dr_uintptr

typedef uintptr_t dr_uintptr

Function Documentation

◆ dr_append_path()

int dr_append_path ( char *  dst,
size_t  dstSize,
const char *  base,
const char *  other 
)

◆ dr_argv_is_set()

dr_bool32 dr_argv_is_set ( int  argc,
char **  argv,
const char *  value 
)

◆ dr_dlclose()

void dr_dlclose ( dr_handle  handle)

◆ dr_dlopen()

dr_handle dr_dlopen ( const char *  filename)

◆ dr_dlsym()

dr_proc dr_dlsym ( dr_handle  handle,
const char *  symbol 
)

◆ dr_extension()

const char* dr_extension ( const char *  path)

◆ dr_extension_equal()

dr_bool32 dr_extension_equal ( const char *  path,
const char *  extension 
)

◆ dr_file_iterator_begin()

dr_file_iterator* dr_file_iterator_begin ( const char *  pFolderPath,
dr_file_iterator pState 
)

◆ dr_file_iterator_end()

void dr_file_iterator_end ( dr_file_iterator pState)

◆ dr_file_iterator_next()

dr_file_iterator* dr_file_iterator_next ( dr_file_iterator pState)

◆ dr_fopen()

static int dr_fopen ( FILE **  ppFile,
const char *  pFilePath,
const char *  pOpenMode 
)
static

◆ dr_open_and_read_file()

void* dr_open_and_read_file ( const char *  pFilePath,
size_t *  pFileSizeOut 
)

◆ dr_open_and_read_file_with_extra_data()

void* dr_open_and_read_file_with_extra_data ( const char *  pFilePath,
size_t *  pFileSizeOut,
size_t  extraBytes 
)

◆ dr_path_file_name()

const char* dr_path_file_name ( const char *  path)

◆ dr_pcm_s32_to_f32()

void dr_pcm_s32_to_f32 ( void *  dst,
const void *  src,
dr_uint64  count 
)

◆ dr_pcm_s32_to_s16()

void dr_pcm_s32_to_s16 ( void *  dst,
const void *  src,
dr_uint64  count 
)

◆ dr_printf_fixed()

int dr_printf_fixed ( int  width,
const char *const  format,
  ... 
)

◆ dr_printf_fixed_with_margin()

int dr_printf_fixed_with_margin ( int  width,
int  margin,
const char *const  format,
  ... 
)

◆ dr_rand_f32()

float dr_rand_f32 ( )

◆ dr_rand_f64()

double dr_rand_f64 ( )

◆ dr_rand_range_f32()

float dr_rand_range_f32 ( float  lo,
float  hi 
)

◆ dr_rand_range_s32()

int dr_rand_range_s32 ( int  lo,
int  hi 
)

◆ dr_rand_range_u64()

dr_uint64 dr_rand_range_u64 ( dr_uint64  lo,
dr_uint64  hi 
)

◆ dr_rand_s32()

int dr_rand_s32 ( )

◆ dr_rand_u32()

unsigned int dr_rand_u32 ( )

◆ dr_rand_u64()

dr_uint64 dr_rand_u64 ( )

◆ dr_scale_to_range_f32()

float dr_scale_to_range_f32 ( float  x,
float  lo,
float  hi 
)

◆ dr_seed()

void dr_seed ( int  seed)

◆ dr_strcat_s()

int dr_strcat_s ( char *  dst,
size_t  dstSizeInBytes,
const char *  src 
)

◆ dr_strcpy_s()

int dr_strcpy_s ( char *  dst,
size_t  dstSizeInBytes,
const char *  src 
)

◆ dr_strncat_s()

int dr_strncat_s ( char *  dst,
size_t  dstSizeInBytes,
const char *  src,
size_t  count 
)

◆ dr_strncpy_s()

int dr_strncpy_s ( char *  dst,
size_t  dstSizeInBytes,
const char *  src,
size_t  count 
)

◆ dr_timer_now()

double dr_timer_now ( )

◆ dr_vprintf_fixed()

int dr_vprintf_fixed ( int  width,
const char *const  format,
va_list  args 
)

◆ dr_vprintf_fixed_with_margin()

int dr_vprintf_fixed_with_margin ( int  width,
int  margin,
const char *const  format,
va_list  args 
)

Variable Documentation

◆ g_drLCG

int g_drLCG
static


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:57