niSetName

Sets a name

Syntax

#include  "niffapi.h"

void niSetName(Nis *nis, u32 index, char *name);

Arguments

nis      Pointer to the Nis structure
index   Index of the Name area for the name you want to set
name   Pointer to the character string for the name being set

Return value

None

Description

For NIFF data, names are not C character strings. This function secures a NIFF data region matching the specified character string, and converts that string into the appropriate data to set the name.

For "index" please specify a pre-existing index. If an incorrect index is specified, the operation cannot be guaranteed. If you want to set the name in a newly added Name area, use niAddName() to add the Name area and then use niSetName() to set the name.

Notes

To avoid problems, the present version replaces blank characters with an underscore'_'.

Because NIFF does not allow blank characters in names, this function will be deleted in a future version. When creating NIFF data, please do not use blank spaces in names.

See Also

niAddName
For the Nis structure, see n64kit/niff/niffapi/nis.h.