niGetName

Gets the character string of a name

Syntax

    #include  "niffapi.h"
    char *niGetName(NisName *nisname);

Arguments

  nisname Pointer to the NisName structure held in the Name area where the name you want is located.

Return value

Returns the pointer to the character string.

Description

For NIFF data, names are not C character strings. This function secures a region that corresponds to the length of the name and returns a C character string.

Example

Gets the name of obj[1]

    char *name;
    name = niGetName(&nis->namel->nisname[nis->objl->obj[1].obj_name_index]);

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

niNewNis
niOpenNb
For the Nis structure, refer to n64kit/niff/niffapi/nis.h.