A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://yazgoo.github.io/fuse_kafka/html/string__list_8c.html below:

fuse_kafka: src/string_list.c File Reference

#include "string_list.h"
#include "util.c"

Go to the source code of this file.

Defines #define  SERVER_LIST_DEFAULT_MAX_SIZE   10 Functions int  string_list_contains (string_list **servers, char *string)   Public: checks if the list contains a string.
int  string_list_new (string_list **servers)   creates a new string_list
void  string_list_free (string_list **servers)   deletes the server list
int  string_list_resize (string_list **servers)   resizes the server list
int  string_list_add (string_list **servers, char *string)   adds a string to the servers list
int  string_list_add_once (string_list **servers, char *string)   add item to list if it is not in it already
Detailed Description

Allows to maintain a server list to check that these servers are not added; Currently, there is no parsing of the string argument given. In the future there might be (to handle server lists) ala zookeeper

Definition in file string_list.c.

Function Documentation

adds a string to the servers list

Returns:
0 if adding was successfull

Definition at line 74 of file string_list.c.

add item to list if it is not in it already

Returns:
0 if item already is in the list 2 if item is not in the list but could not be added 1 if item was not in the list and was successfully added

Definition at line 96 of file string_list.c.

Public: checks if the list contains a string.

Parameters:
servers a pointer to the string_list
Returns:
0 if *servers is NULL or the list does not contain the string, 1 otherwise

Definition at line 16 of file string_list.c.

creates a new string_list

Returns:
0 if the creation was a success

Definition at line 31 of file string_list.c.

resizes the server list

Returns:
1 if resize failed, 0 otherwise

Definition at line 59 of file string_list.c.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4