 |
PK_ATTRIB_set_string |
|
PK_ERROR_code_t PK_ATTRIB_set_string
(
--- received arguments ---
PK_ATTRIB_t attrib, --- attribute
int field_no, --- field number (>= 0)
const char *string --- null-terminated string to set
--- (possibly NULL or "")
)
This function copies 'string' into field number 'field_no' of the given
attribute.
Specific Errors:
PK_ERROR_bad_field_number (MILD) The attribute does not have a field
with this number
PK_ERROR_field_of_wrong_type (MILD) The field is not a string field
PK_ERROR_bad_value (MILD) The field data is in some way
invalid for the intended field.
PK_ERROR_not_same_length (MILD) The 'attrib' is a no-roll attribute
and the length of 'string' is not
equal to the existing field length
The new data replaces any existing data stored in the field.
If a zero length string ("") or NULL is given as the 'string' argument,
the field is set to be empty.
See here for more information about attribute processing.