DulReadFacility - Reads a message facility table (_msgt.h) file

Function

Reads a message facility table (_msgt.h) file and dynamically adds the facility to the current program.

Description

The message facility table file is a C include file is generated by the messgen program and defines a couple of structures which are normally passed directly to MessPutFacility. This normally means all facilities must be known at compile type. This function reads such an include file and creates the required structures dynamically. It then makes this facility known using MessPutFacility This allows facilities not known at compile time to be added.

Language

C

Call

(void) = DulReadFacility (filename, status)

Parameters

(">" input, "!" modified, "W" workspace, "<" output)

>filenameconst char *Name of the message facility table file.
>statusStatusType *Modified status

Include File

dul.h

External functions used

MessPutFacilityMess Put a facility
ErsRepErs Report an error
strlenCrtl return the length of a string
strcpyCrtl copy one string to another
mallocCrtl allocate memory
fopenCrtl Open a file
fgetsCrtl Read a line from a file
ftellCrtl Return the current position in a file
fseekCrtl Goto a positon in a file
fcloseCrtl Close a file

See Also

Dul library document, MessPutFacility(3), Mess package spec.

Support

Tony Farrell, AAO

Click here for the DRAMA home page and here for the AAO home page.

 For more information, contact tjf@aaoepp.aao.gov.au