Data Structures | Functions
intex.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  INT_list
 

Functions

int intExpand (char *text, INT_list *list)
 
INT_list intMerge (INT_list *list1, INT_list *list2)
 
int _intexadd (INT_list *list, int a)
 

Function Documentation

◆ _intexadd()

int _intexadd ( INT_list list,
int  a 
)

int _intexadd(int *list, int a) ; local function

Parameters
list
a

References INT_list::i, and INT_list::nr.

Referenced by intExpand().

◆ intExpand()

int intExpand ( char *  text,
INT_list list 
)

Existing list is freed and all data is cleared. Expanded integers are listed in list.i[] in increasing order.

Parameters
textInteger expressions to be expanded, e.g. 0-8,12,34-28
listPointer for int list data
Returns
0 if ok and at least one integer is listed.

References _intexadd(), INT_list::i, INT_list::nr, and swap().

Here is the call graph for this function:

◆ intMerge()

INT_list intMerge ( INT_list list1,
INT_list list2 
)

Merges two lists and returns the result. (the originals are not touched) Duplicate entries are removed.

Parameters
list1The first list
list2The second list
Returns
pointer to the new combined list.

References INT_list::i, and INT_list::nr.