'\" te .\" Copyright (c) 1996, The Open Group. All Rights Reserved. .\" Portions Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved. .\" The Open Group have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from The Open Group Technical Standard Portable Layout Services: Context-Dependent and Directional Text ISBN 1-85912-142-X In the event of any discrepancy between this version and the original specification, the original Open Group Standard is the referee document. The original document can be obtained online at http://www.opengroup.org/bookstore/ . .TH m_create_layout 3LAYOUT "24 Apr 2014" "SunOS 5.11" "Layout Service Library Functions" .SH NAME m_create_layout \- initialize a layout object .SH SYNOPSIS .LP .nf cc [ \fIflag\fR... ] \fIfile\fR... -llayout [ \fIlibrary\fR... ] #include \fBLayoutObject\fR \fBm_create_layout\fR(\fBconst AttrObject\fR \fIattrobj\fR, \fB const char*\fR\fImodifier\fR); .fi .SH DESCRIPTION .sp .LP The \fBm_create_layout()\fR function creates a \fBLayoutObject\fR associated with the locale identified by \fIattrobj\fR. .sp .LP The \fBLayoutObject\fR 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 \fIattrobj\fR. The memory for the \fBLayoutObject\fR is allocated by \fBm_create_layout()\fR. The \fBLayoutObject\fR created has default layout values. If the \fImodifier\fR argument is not \fINULL\fR, the layout values specified by the \fImodifier\fR overwrite the default layout values associated with the locale. Internal states maintained by the layout transformation function across transformations are set to their initial values. .sp .LP The \fIattrobj\fR 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 \fIattrobj\fR argument specifies a name that is usually associated with a locale category. If \fIattrobj\fR is \fINULL\fR, the created \fBLayoutObject\fR is associated with the current locale as set by the \fBsetlocale\fR(3C) function. .sp .LP The \fImodifier\fR argument announces a set of layout values when the \fBLayoutObject\fR is created. .SH RETURN VALUES .sp .LP Upon successful completion, the \fBm_create_layout()\fR function returns a \fBLayoutObject\fR for use in subsequent calls to \fBm_*_layout()\fR functions. Otherwise the \fBm_create_layout()\fR function returns (\fBLayoutObject\fR) 0 and sets \fBerrno\fR to indicate the error. .SH ERRORS .sp .LP The \fBm_create_layout()\fR function may fail if: .sp .ne 2 .mk .na \fB\fBEBADF\fR\fR .ad .RS 10n .rt The attribute object is invalid or the locale asssociated with the attribute object is not available. .RE .sp .ne 2 .mk .na \fB\fBEINVAL\fR\fR .ad .RS 10n .rt The \fImodifier\fR string has a syntax error or it contains unknown layout values. .RE .sp .ne 2 .mk .na \fB\fBEMFILE\fR\fR .ad .RS 10n .rt There are \fB{OPEN_MAX}\fR file descriptors currently open in the calling process. .RE .sp .ne 2 .mk .na \fB\fBENOMEM\fR\fR .ad .RS 10n .rt Insufficient storage space is available. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelMT-Safe _ StandardSee \fBstandards\fR(5). .TE .SH SEE ALSO .sp .LP \fBsetlocale\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5)