PURPOSE

Fldid, Fldid32 - map field name to field identifier

SYNOPSIS

#include <stdio.h>
#include "fml.h"
FLDID
Fldid(char *name)
#include "fml32.h"
FLDID32
Fldid32(char *name)

DESCRIPTION

Fldid() provides a runtime translation of a field-name to its field identifier and returns a FLDID corresponding to its field name parameter. The first invocation causes space to be dynamically allocated for the field tables and the tables to be loaded. To recover data space used by the field tables loaded by Fldid(), the user may unload the files by a call to the Fnmid_unload(3fml) function.

Fldid32 is used with 32-bit FML.

RETURN VALUES

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

ERRORS

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

[FBADNAME]
"unknown field name" A field name is specified which cannot be found in the field tables.
[FMALLOC]
"malloc failed" Allocation of space dynamically using malloc(3) failed.
[FEUNIX]

"UNIX system call error"
File exists but user does not have read access.

SEE ALSO

Fintro(3fml),
Fldno(3fml),
Fname(3fml),
Fnmid_unload(3fml),
malloc(3) in a UNIX System reference manual