utils/util_func.c File Reference

#include <stdio.h>
#include "kp_error.h"
#include "../structures.h"
#include "util_func.h"
#include "list.h"
#include <sys/types.h>
#include <stdlib.h>
#include "../properties.h"
#include "kpi_low.h"

Functions

char * get_str_duplicate (const char *string)
 Gets duplacate of given string.
bool is_in_property_list (property_t *item, list_t *property_list)
 Checkes is there input item in list of properties.
bool is_in_property_values_list (prop_val_t *item, list_t *property_list)
 Checkes is there input item in list of properties values.
ss_triple_t * concat_triplets (ss_triple_t *a, ss_triple_t *b)
 Concatenate two triples lists.

Function Documentation

ss_triple_t* concat_triplets ( ss_triple_t *  a,
ss_triple_t *  b 
)

Concatenate two triples lists.

This function only add triples list b to a. No new memory allocated. If you using delete function for list a, b will be deleted too.

Parameters:
a first triples list.
b second triples list.
Returns:
list a with added b. If one of list equals NULL, it return another, if both equals NULL it return NULL.

char* get_str_duplicate ( const char *  string  ) 

Gets duplacate of given string.

Parameters:
string to duplcate.
Returns:
on success, retuens a ppointer to the location containing the duplicate string, otherwise NULL.

bool is_in_property_list ( property_t *  item,
list_t property_list 
)

Checkes is there input item in list of properties.

Parameters:
property_t needl.
list_head_t haystack.
Returns:
returns true if item founded in list and false otherwise.

bool is_in_property_values_list ( prop_val_t *  item,
list_t property_list 
)

Checkes is there input item in list of properties values.

Parameters:
prop_val_t needl.
list_head_t haystack.
Returns:
returns true if item founded in list and false otherwise.


doxygen