SDDSlib
|
This file contains functions for scanning and parsing item lists with various data types. More...
#include "mdb.h"
#include "scan.h"
#include "match_string.h"
#include <stdarg.h>
Go to the source code of this file.
Functions | |
long | scanItemList (unsigned long *flags, char **item, long *items, unsigned long mode,...) |
Scans a list of items and assigns values based on provided keywords and types. | |
long | scanItemListLong (unsigned long long *flags, char **item, long *items, unsigned long mode,...) |
Scans a list of items with extended flag support and assigns values based on provided keywords and types. | |
long | scan_item_list (unsigned long *flags, char **item, long *items,...) |
Scans a list of items without flag extension and assigns values based on provided keywords and types. | |
long | contains_keyword_phrase (char *string) |
Checks if a string contains an unescaped equal sign, indicating a keyword-value phrase. | |
This file contains functions for scanning and parsing item lists with various data types.
Definition in file scanitemlist.c.
long contains_keyword_phrase | ( | char * | string | ) |
Checks if a string contains an unescaped equal sign, indicating a keyword-value phrase.
This function scans the input string for the presence of an equal sign ('=') that is not preceded by a backslash ('\'). It returns 1 if such a keyword-value pair is found, otherwise returns 0. Additionally, it handles escaped equal signs by removing the escape character.
string | The input string to be checked for keyword-value phrases. |
Definition at line 547 of file scanitemlist.c.
long scan_item_list | ( | unsigned long * | flags, |
char ** | item, | ||
long * | items, | ||
... ) |
Scans a list of items without flag extension and assigns values based on provided keywords and types.
This version of the scanning function lacks certain functionalities such as flag extension and may not flag entries that don't match any keywords. It is used in various locations within the codebase.
flags | Pointer to an unsigned long variable where flags will be set based on matched items. |
item | Array of strings containing items to be scanned, each in the format "keyword=value" or "keyword". |
items | Pointer to a long variable indicating the number of items in the item array. It will be updated based on the scanning process. |
... | Variable arguments specifying pairs of <keyword>, <SDDS-type>, <pointer>, <number-required>, <set-flag>, etc., ending with NULL. |
Definition at line 400 of file scanitemlist.c.
long scanItemList | ( | unsigned long * | flags, |
char ** | item, | ||
long * | items, | ||
unsigned long | mode, | ||
... ) |
Scans a list of items and assigns values based on provided keywords and types.
This function processes a list of item strings, each potentially in the format "keyword=value", and assigns the corresponding values to provided data pointers based on specified SDDS types. It supports setting flags and handles various data types as specified in the variable arguments.
flags | Pointer to an unsigned long variable where flags will be set based on matched items. |
item | Array of strings containing items to be scanned, each in the format "keyword=value" or "keyword". |
items | Pointer to a long variable indicating the number of items in the item array. It will be updated based on the scanning process. |
mode | Unsigned long value specifying the scanning mode, used for future expansion and controlling behavior. |
... | Variable arguments specifying pairs of <keyword>, <SDDS-type>, <pointer>, <number-required>, <set-flag>, etc., ending with NULL. |
Definition at line 41 of file scanitemlist.c.
long scanItemListLong | ( | unsigned long long * | flags, |
char ** | item, | ||
long * | items, | ||
unsigned long | mode, | ||
... ) |
Scans a list of items with extended flag support and assigns values based on provided keywords and types.
This function is similar to scanItemList
but uses an unsigned long long
for flags, allowing for a larger set of flags. It processes a list of item strings, assigns values based on SDDS types, and supports various scanning modes.
flags | Pointer to an unsigned long long variable where flags will be set based on matched items. |
item | Array of strings containing items to be scanned, each in the format "keyword=value" or "keyword". |
items | Pointer to a long variable indicating the number of items in the item array. It will be updated based on the scanning process. |
mode | Unsigned long value specifying the scanning mode, used for future expansion and controlling behavior. |
... | Variable arguments specifying pairs of <keyword>, <SDDS-type>, <pointer>, <number-required>, <set-flag>, etc., ending with NULL. |
Definition at line 226 of file scanitemlist.c.