m_create_layout() — Create and initialize a layout object (bidi data)

Standards

Standards / Extensions C or C++ Dependencies

ISO C
XPG4
C99

both z/OS V1R2

Format

#include <sys/layout.h>

LayoutObject m_create_layout(const AttrObject attrobj, const char *modifier);

General description

The m_create_layout() function is part of the support for handling of bidirectional (Bidi) conversion of data between Visual (MVS™) and Implicit (z/OS® UNIX) formats. Initial support is for Arabic and Hebrew data.

The m_create_layout() function creates a LayoutObject associated with the locale identified by attrobj. The LayoutObject is an opaque object containing all the data and methods necessary to perform the layout operations on context-dependent or directional characters of the locale identified by the attrobj.

The memory for the LayoutObject is allocated by m_create_layout(). The LayoutObject created has default layout values. If the modifier argument is not NULL, the layout values specified by the modifier will overwrite the default layout values associated with the locale. Also, internal states maintained by the layout transformation function across transformations are set to their initial values.

The attrobj argument is or may be an amalgam of many opaque objects. A locale object is just one example of the type of object that can be attached to an attribute object. The attrobj argument specifies a name that is usually associated with a locale category. If attrobj is NULL, the LayoutObject created is associated with the current locale as set by the setlocale() function.

The modifier argument can be used to announce a set of layout values when the LayoutObject is created.

A LayoutObject created by m_create_layout() is deleted by calling the m_destroy_layout() function.

For a detailed description of bidirectional layout transformation, see Bidirectional Language Support in z/OS XL C/C++ Programming Guide.

Returned value

If successful, m_create_layout() returns a LayoutObject for use in subsequent calls to m_*_layout() functions.

If unsuccessful, m_create_layout() returns (LayoutObject)0 and sets errno to one of the following values:

Error Code
Description
EBADF
The attribute object is invalid or the locale associated with the attribute object is not available.
EINVAL
The modifier string has a syntax error or it contains unknown layout values.
ENOMEM
Insufficient storage space is available.

Related information