Functions
intex.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include "include/intex.h"
Include dependency graph for intex.c:

Functions

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

Function Documentation

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().

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:

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.