CVector  4.1.0
A C++ style vector library in strict ANSI C (C89)
Data Structures | Macros | Typedefs | Functions | Variables
cvector_short.h File Reference
#include <stdlib.h>

Go to the source code of this file.

Data Structures

struct  cvector_short
 Data structure for short vector. More...
 

Macros

#define CVEC_SIZE_T   size_t
 
#define CVEC_SZ
 

Typedefs

typedef CVEC_SIZE_T cvec_sz
 

Functions

int cvec_short (cvector_short *vec, cvec_sz size, cvec_sz capacity)
 
int cvec_init_short (cvector_short *vec, short *vals, cvec_sz num)
 
cvector_shortcvec_short_heap (cvec_sz size, cvec_sz capacity)
 
cvector_shortcvec_init_short_heap (short *vals, cvec_sz num)
 
int cvec_copyc_short (void *dest, void *src)
 
int cvec_copy_short (cvector_short *dest, cvector_short *src)
 
int cvec_push_short (cvector_short *vec, short a)
 
short cvec_pop_short (cvector_short *vec)
 
int cvec_extend_short (cvector_short *vec, cvec_sz num)
 
int cvec_insert_short (cvector_short *vec, cvec_sz i, short a)
 
int cvec_insert_array_short (cvector_short *vec, cvec_sz i, short *a, cvec_sz num)
 
short cvec_replace_short (cvector_short *vec, cvec_sz i, short a)
 
void cvec_erase_short (cvector_short *vec, cvec_sz start, cvec_sz end)
 
int cvec_reserve_short (cvector_short *vec, cvec_sz size)
 
int cvec_set_cap_short (cvector_short *vec, cvec_sz size)
 
void cvec_set_val_sz_short (cvector_short *vec, short val)
 
void cvec_set_val_cap_short (cvector_short *vec, short val)
 
short * cvec_back_short (cvector_short *vec)
 
void cvec_clear_short (cvector_short *vec)
 
void cvec_free_short_heap (void *vec)
 
void cvec_free_short (void *vec)
 

Variables

cvec_sz CVEC_short_SZ
 

Macro Definition Documentation

◆ CVEC_SIZE_T

#define CVEC_SIZE_T   size_t

Definition at line 41 of file cvector_short.h.

◆ CVEC_SZ

#define CVEC_SZ

Definition at line 45 of file cvector_short.h.

Typedef Documentation

◆ cvec_sz

Definition at line 46 of file cvector_short.h.

Function Documentation

◆ cvec_back_short()

short* cvec_back_short ( cvector_short vec)

◆ cvec_clear_short()

void cvec_clear_short ( cvector_short vec)

◆ cvec_copy_short()

int cvec_copy_short ( cvector_short dest,
cvector_short src 
)

◆ cvec_copyc_short()

int cvec_copyc_short ( void *  dest,
void *  src 
)

◆ cvec_erase_short()

void cvec_erase_short ( cvector_short vec,
cvec_sz  start,
cvec_sz  end 
)

◆ cvec_extend_short()

int cvec_extend_short ( cvector_short vec,
cvec_sz  num 
)

◆ cvec_free_short()

void cvec_free_short ( void *  vec)

◆ cvec_free_short_heap()

void cvec_free_short_heap ( void *  vec)

◆ cvec_init_short()

int cvec_init_short ( cvector_short vec,
short *  vals,
cvec_sz  num 
)

◆ cvec_init_short_heap()

cvector_short* cvec_init_short_heap ( short *  vals,
cvec_sz  num 
)

◆ cvec_insert_array_short()

int cvec_insert_array_short ( cvector_short vec,
cvec_sz  i,
short *  a,
cvec_sz  num 
)

◆ cvec_insert_short()

int cvec_insert_short ( cvector_short vec,
cvec_sz  i,
short  a 
)

◆ cvec_pop_short()

short cvec_pop_short ( cvector_short vec)

◆ cvec_push_short()

int cvec_push_short ( cvector_short vec,
short  a 
)

◆ cvec_replace_short()

short cvec_replace_short ( cvector_short vec,
cvec_sz  i,
short  a 
)

◆ cvec_reserve_short()

int cvec_reserve_short ( cvector_short vec,
cvec_sz  size 
)

◆ cvec_set_cap_short()

int cvec_set_cap_short ( cvector_short vec,
cvec_sz  size 
)

◆ cvec_set_val_cap_short()

void cvec_set_val_cap_short ( cvector_short vec,
short  val 
)

◆ cvec_set_val_sz_short()

void cvec_set_val_sz_short ( cvector_short vec,
short  val 
)

◆ cvec_short()

int cvec_short ( cvector_short vec,
cvec_sz  size,
cvec_sz  capacity 
)

◆ cvec_short_heap()

cvector_short* cvec_short_heap ( cvec_sz  size,
cvec_sz  capacity 
)

Variable Documentation

◆ CVEC_short_SZ

cvec_sz CVEC_short_SZ
extern