Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

iftsrch.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "include/ift.h"

Functions

int iftGet (IFT *ift, char *key)
int iftGetNth (IFT *ift, char *key, int n)
int iftFindNthKey (IFT *ift, char *str, int n)
int iftFindNthValue (IFT *ift, char *str, int n)

Function Documentation

int iftFindNthKey IFT ift,
char *  str,
int  n
 

Find the Nth item of IFT where the specified string is found in the key. Comparison is case sensitive.

Returns:
Returns -1 if key was not found, or other negative value in case of an error, and the index [0..keyNr-1] if matching key is found.
Parameters:
ift  Pointer to existing IFT
str  Pointer to the case-sensitive (partial) key string
n  Nth (1..keyNr-1) insidence of value is searched.

int iftFindNthValue IFT ift,
char *  str,
int  n
 

Find the Nth item of IFT where the specified string is found in the value. Comparison is case sensitive.

Returns:
Returns -1 if key was not found, or other negative value in case of an error, and the index [0..keyNr-1] if matching value is found.
Parameters:
ift  Pointer to existing IFT
str  Pointer to the case-sensitive (partial) value string
n  Nth (1..keyNr-1) insidence of value is searched.

int iftGet IFT ift,
char *  key
 

Find the key in the IFT and return the index [0..keyNr-1]. Key is case insensitive.

Returns:
Returns -1 if key was not found, or other negative value in case of an error
Parameters:
ift  Pointer to existing IFT
key  Pointer to the key string; contents are replaced by the correct key string

int iftGetNth IFT ift,
char *  key,
int  n
 

Find the Nth key with similar name in the IFT and return the index [0..keyNr-1]. Key is case insensitive.

Returns:
Returns -1 if key was not found, or other negative value in case of an error
Parameters:
ift  Pointer to existing IFT
key  Pointer to the key string; contents are replaced by the correct key string
n  Nth (1..) insidence of key is searched.


Generated on Wed Jan 5 23:33:12 2005 for libIFT by  doxygen 1.3.9.1