YAC 3.21.0
Yet Another Coupler
Loading...
Searching...
No Matches
param_str.h File Reference
#include "param.h"
#include <stddef.h>
Include dependency graph for param_str.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

struct yac_param * yac_param_str_new (const char *name, char **value_ptr, const char *default_value, int allow_NULL, int allow_empty, size_t max_str_len, int has_default, int is_defined)
 Create a string parameter.
 

Function Documentation

◆ yac_param_str_new()

struct yac_param * yac_param_str_new ( const char * name,
char ** value_ptr,
const char * default_value,
int allow_NULL,
int allow_empty,
size_t max_str_len,
int has_default,
int is_defined )

Create a string parameter.

Parameters
nameName of the parameter
value_ptrPointer to the string value
default_valueDefault string value (copied internally, ignored if has_default is false)
allow_NULLAllow NULL value_ptr (1 = allow, 0 = error)
allow_emptyAllow empty string (value[0] == '\0')
max_str_lenMaximum allowed string length (excluding null terminator)
has_defaultIf true, parameter has a default value; if false, value is undefined until set
is_definedIf true, initial value is considered defined (can be NULL or empty depending on allow_NULL and allow_empty); if false, initial value is considered undefined and user must set it before getting
Returns
Pointer to new parameter handle

Definition at line 176 of file param_str.c.

Here is the caller graph for this function: