statsf_set_code(3)

LIBRARY
#include <statsf.h>
-lbasic-stats -lxtend

SYNOPSIS

int     statsf_set_code(statsf_t *statsf_ptr, statsf_code_t new_code)

ARGUMENTS
statsf_ptr      Pointer to the structure to set
new_code        The new value for code

DESCRIPTION
Mutator for code member in a statsf_t structure. Use this function to set code in a statsf_t object from non-member functions. This function performs a direct assignment for scalar or pointer structure members. If code is a pointer, data previously pointed to should be freed before calling this function to avoid memory leaks.

RETURN VALUES
STATSF_DATA_OK if the new value is acceptable and assigned STATSF_DATA_OUT_OF_RANGE otherwise

EXAMPLES
statsf_t        statsf;
statsf_code_t   new_code;
if ( statsf_set_code(&statsf, new_code)
        == STATSF_DATA_OK )
{
}

SEE ALSO
(3)