#include <stdio.h>#include <stdlib.h>#include <string.h>#include <ctype.h>#include <math.h>#include "include/ift.h"#include "include/substitutions.h"Go to the source code of this file.
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) |
| int | iftGetFrom (IFT *ift, int si, const char *key) |
| int | iftGetFullmatchFrom (IFT *ift, int si, const char *key, const char *value) |
| int | iftGetFloatValue (IFT *ift, int si, const char *key, float *value) |
| int | iftGetIntValue (IFT *ift, int si, const char *key, int *value) |
| 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.
| ift | Pointer to existing IFT |
| str | Pointer to the case-sensitive (partial) key string |
| n | Nth (1..keyNr-1) insidence of value is searched. |
Definition at line 119 of file iftsrch.c.
References IFT_FAULT, IFT_KEYNOTFOUND, IFT_OK, IFT_TEST, iftSetStatus(), IFT::item, IFT_KEY_AND_VALUE::key, and IFT::keyNr.
| 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.
| ift | Pointer to existing IFT |
| str | Pointer to the case-sensitive (partial) value string |
| n | Nth (1..keyNr-1) insidence of value is searched. |
Definition at line 150 of file iftsrch.c.
References IFT_FAULT, IFT_OK, IFT_TEST, IFT_VALUENOTFOUND, iftSetStatus(), IFT::item, IFT::keyNr, and IFT_KEY_AND_VALUE::value.
Find the key in the IFT and return the index [0..keyNr-1]. Key is case insensitive.
| ift | Pointer to existing IFT |
| key | Pointer to the key string; contents are replaced by the correct key string |
Definition at line 58 of file iftsrch.c.
References IFT_FAULT, IFT_KEYNOTFOUND, IFT_OK, IFT_TEST, iftSetStatus(), IFT::item, IFT_KEY_AND_VALUE::key, and IFT::keyNr.
| int iftGetFloatValue | ( | IFT * | ift, |
| int | si, | ||
| const char * | key, | ||
| float * | value | ||
| ) |
Finds the specified key string from IFT struct, and reads the corresponding value as float.
| ift | Pointer to existing IFT |
| si | Index [0..keyNr-1] from which the search is started |
| key | Pointer to the key string; search is case-insensitive |
| value | Pointer to float variable where value is written; NaN is written in case of an error. |
Definition at line 244 of file iftsrch.c.
References IFT_FAULT, IFT_KEYNOTFOUND, IFT_OK, IFT_TEST, IFT_VALUENOTFOUND, iftSetStatus(), IFT::item, IFT_KEY_AND_VALUE::key, IFT::keyNr, and IFT_KEY_AND_VALUE::value.
| int iftGetFrom | ( | IFT * | ift, |
| int | si, | ||
| const char * | key | ||
| ) |
Finds the specified key in the IFT, starting from specified index. Key is case insensitive.
| ift | Pointer to existing IFT |
| si | Index [0..keyNr-1] from which the search is started |
| key | Pointer to the key string; search is case-insensitive |
Definition at line 176 of file iftsrch.c.
References IFT_FAULT, IFT_KEYNOTFOUND, IFT_OK, IFT_TEST, iftSetStatus(), IFT::item, IFT_KEY_AND_VALUE::key, and IFT::keyNr.
| int iftGetFullmatchFrom | ( | IFT * | ift, |
| int | si, | ||
| const char * | key, | ||
| const char * | value | ||
| ) |
Finds the index with specified key and value in the IFT, starting from specified index. Key and value are case insensitive.
| ift | Pointer to existing IFT |
| si | Index [0..keyNr-1] from which the search is started |
| key | Pointer to the key string; search is case-insensitive |
| value | Pointer to the value string; search is case-insensitive |
Definition at line 208 of file iftsrch.c.
References IFT_FAULT, IFT_KEYNOTFOUND, IFT_OK, IFT_TEST, iftSetStatus(), IFT::item, IFT_KEY_AND_VALUE::key, IFT::keyNr, and IFT_KEY_AND_VALUE::value.
| int iftGetIntValue | ( | IFT * | ift, |
| int | si, | ||
| const char * | key, | ||
| int * | value | ||
| ) |
Finds the specified key string from IFT struct, and reads the corresponding value as int.
| ift | Pointer to existing IFT |
| si | Index [0..keyNr-1] from which the search is started |
| key | Pointer to the key string; search is case-insensitive |
| value | Pointer to int variable where value is written; -9999 is written in case of an error. |
Definition at line 284 of file iftsrch.c.
References IFT_FAULT, IFT_KEYNOTFOUND, IFT_OK, IFT_TEST, IFT_VALUENOTFOUND, iftSetStatus(), IFT::item, IFT_KEY_AND_VALUE::key, IFT::keyNr, and IFT_KEY_AND_VALUE::value.
Find the Nth key with similar name in the IFT and return the index [0..keyNr-1]. Key is case insensitive.
| 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. |
Definition at line 88 of file iftsrch.c.
References IFT_FAULT, IFT_KEYNOTFOUND, IFT_OK, IFT_TEST, iftSetStatus(), IFT::item, IFT_KEY_AND_VALUE::key, and IFT::keyNr.
1.8.0