[Top] [Prev] [Next] [Bottom]

Fname (3FML)

Fname (3FML)

Name

Fname, Fname32-map field identifier to field name

Synopsis

#include <stdio.h>  
#include "fml.h"

char *
Fname(FLDID fieldid)

#include "fml32.h"

char *
Fname32(FLDID32 fieldid)

Description

Fname() provides a runtime translation of a field identifier, fieldid, to its field name and returns a pointer to a character string containing the name corresponding to its argument. The first invocation causes space to be dynamically allocated for the field tables and the tables to be loaded. The table space used by the mapping tables created by Fname() may be recovered by a call to the function Fidnm_unload(3).

Fname32 is used with 32-bit FML.

Return Values

This function returns NULL on error and sets Ferror to indicate the error condition.

Errors

Under the following conditions, Fname() fails and sets Ferror to:

[FBADFLD]
"unknown field number or type"
A field number is specified for which a field name cannot be found or is invalid (0).

[FMALLOC]
"malloc failed"
Allocation of space dynamically using malloc(3) failed.

See Also

Fintro(3), Ffprint(3), Fidnm_unload(3), Fldid(3), Fprint(3)



[Top] [Prev] [Next] [Bottom]