geany  1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
  Fossies Dox: geany-1.38.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

ptrarray.c File Reference
#include "general.h"
#include <string.h>
#include <stdlib.h>
#include "debug.h"
#include "ptrarray.h"
#include "routines.h"
Include dependency graph for ptrarray.c:

Go to the source code of this file.

Classes

struct  sPtrArray
 

Functions

ptrArrayptrArrayNew (ptrArrayDeleteFunc deleteFunc)
 
unsigned int ptrArrayAdd (ptrArray *const current, void *ptr)
 
void * ptrArrayRemoveLast (ptrArray *const current)
 
void ptrArrayCombine (ptrArray *const current, ptrArray *const from)
 
unsigned int ptrArrayCount (const ptrArray *const current)
 
void * ptrArrayItem (const ptrArray *const current, const unsigned int indx)
 
void * ptrArrayLast (const ptrArray *const current)
 
void ptrArrayClear (ptrArray *const current)
 
void ptrArrayDelete (ptrArray *const current)
 
bool ptrArrayHasTest (const ptrArray *const current, bool(*test)(const void *ptr, void *userData), void *userData)
 
static bool ptrEq (const void *ptr, void *userData)
 
bool ptrArrayHas (const ptrArray *const current, void *ptr)
 
void ptrArrayReverse (const ptrArray *const current)
 
void ptrArrayDeleteItem (ptrArray *const current, unsigned int indx)
 
static int ptrArraySortCompare (const void *a0, const void *b0)
 
void ptrArraySort (ptrArray *const current, int(*compare)(const void *, const void *))
 

Variables

static int(* ptrArraySortCompareVar )(const void *, const void *)
 

Function Documentation

◆ ptrArrayAdd()

◆ ptrArrayClear()

◆ ptrArrayCombine()

void ptrArrayCombine ( ptrArray *const  current,
ptrArray *const  from 
)

Definition at line 69 of file ptrarray.c.

References sPtrArray::array, Assert, sPtrArray::count, NULL, ptrArrayAdd(), and ptrArrayDelete().

Referenced by stringListCombine().

◆ ptrArrayCount()

◆ ptrArrayDelete()

◆ ptrArrayDeleteItem()

void ptrArrayDeleteItem ( ptrArray *const  current,
unsigned int  indx 
)

Definition at line 157 of file ptrarray.c.

References sPtrArray::array, sPtrArray::count, sPtrArray::deleteFunc, and ptr.

Referenced by stringListDeleteItemExtension().

◆ ptrArrayHas()

bool ptrArrayHas ( const ptrArray *const  current,
void *  ptr 
)

Definition at line 138 of file ptrarray.c.

References ptr, ptrArrayHasTest(), and ptrEq().

Referenced by anonResetMaybe().

◆ ptrArrayHasTest()

bool ptrArrayHasTest ( const ptrArray *const  current,
bool(*)(const void *ptr, void *userData)  test,
void *  userData 
)

Definition at line 121 of file ptrarray.c.

References sPtrArray::array, Assert, sPtrArray::count, and NULL.

Referenced by ptrArrayHas().

◆ ptrArrayItem()

◆ ptrArrayLast()

◆ ptrArrayNew()

◆ ptrArrayRemoveLast()

void * ptrArrayRemoveLast ( ptrArray *const  current)

◆ ptrArrayReverse()

void ptrArrayReverse ( const ptrArray *const  current)

Definition at line 143 of file ptrarray.c.

References sPtrArray::array, Assert, sPtrArray::count, and NULL.

Referenced by stringListReverse().

◆ ptrArraySort()

void ptrArraySort ( ptrArray *const  current,
int(*)(const void *, const void *)  compare 
)

◆ ptrArraySortCompare()

static int ptrArraySortCompare ( const void *  a0,
const void *  b0 
)
static

Definition at line 171 of file ptrarray.c.

References ptrArraySortCompareVar.

Referenced by ptrArraySort().

◆ ptrEq()

static bool ptrEq ( const void *  ptr,
void *  userData 
)
static

Definition at line 133 of file ptrarray.c.

References ptr.

Referenced by ptrArrayHas().

Variable Documentation

◆ ptrArraySortCompareVar

int(* ptrArraySortCompareVar) (const void *, const void *) ( const void *  ,
const void *   
)
static

Definition at line 169 of file ptrarray.c.

Referenced by ptrArraySort(), and ptrArraySortCompare().