'\" t .\" OpenHieC.sgm /main/10 1996/09/08 21:26:00 rws $ .de P! .fl \!!1 setgray .fl \\&.\" .fl \!!0 setgray .fl \" force out current output buffer \!!save /psv exch def currentpoint translate 0 0 moveto \!!/showpage{}def .fl \" prolog .sy sed -e 's/^/!/' \\$1\" bring in postscript file \!!psv restore . .de pF .ie \\*(f1 .ds f1 \\n(.f .el .ie \\*(f2 .ds f2 \\n(.f .el .ie \\*(f3 .ds f3 \\n(.f .el .ie \\*(f4 .ds f4 \\n(.f .el .tm ? font overflow .ft \\$1 .. .de fP .ie !\\*(f4 \{\ . ft \\*(f4 . ds f4\" ' br \} .el .ie !\\*(f3 \{\ . ft \\*(f3 . ds f3\" ' br \} .el .ie !\\*(f2 \{\ . ft \\*(f2 . ds f2\" ' br \} .el .ie !\\*(f1 \{\ . ft \\*(f1 . ds f1\" ' br \} .el .tm ? font underflow .. .ds f1\" .ds f2\" .ds f3\" .ds f4\" .ta 8n 16n 24n 32n 40n 48n 56n 64n 72n .TH "MrmOpenHierarchyPerDisplay" 3 .SH "NAME" \fBMrmOpenHierarchyPerDisplay\fP \(em Allocates a hierarchy ID and opens all the UID files in the hierarchy "MrmOpenHierarchyPer\\%Display" "uil functions" "MrmOpenHierarchyPer\\%Display" .SH "SYNOPSIS" .PP .nf #include \fBCardinal \fBMrmOpenHierarchyPerDisplay\fP\fR( \fBDisplay *\fBdisplay\fR\fR, \fBMrmCount \fBnum_files\fR\fR, \fBString \fBfile_names_list\fR[]\fR, \fBMrmOsOpenParamPtr *\fBancillary_structures_list\fR\fR, \fBMrmHierarchy *\fBhierarchy_id\fR\fR); .fi .SH "DESCRIPTION" .PP \fBMrmOpenHierarchyPerDisplay\fP allows you to specify the list of UID files that MRM searches in subsequent fetch operations\&. All subsequent fetch operations return the first occurrence of the named item encountered while traversing the UID hierarchy from the first list element (UID file specification) to the last list element\&. This function also allocates a hierarchy ID and opens all the UID files in the hierarchy\&. It initializes the optimized search lists in the hierarchy\&. If \fBMrmOpenHierarchyPerDisplay\fP encounters any errors during its execution, any files that were opened are closed\&. .PP The application must call \fBXtAppInitialize\fP before calling \fBMrmOpenHierarchyPerDisplay\fP\&. .IP "\fIdisplay\fP" 10 Specifies the connection to the X server and the value to pass to \fBXtResolvePathname\fP\&. For more information on the \fBDisplay\fR structure, see the Xlib function \fBXOpenDisplay\fP\&. .IP "\fInum_files\fP" 10 Specifies the number of files in the name list\&. .IP "\fIfile_names_list\fP" 10 Specifies an array of character strings that identify the UID files\&. .IP "\fIancillary_structures_list\fP" 10 A list of operating-system-dependent ancillary structures corresponding to items such as filenames, clobber flags, and so forth\&. This argument should be NULL for most operations\&. If you need to reference this structure, see the definition of \fBMrmOsOpenParamPtr\fR in the \fBMrmPublic\&.h\fP header file for more information\&. .IP "\fIhierarchy_id\fP" 10 Returns the search hierarchy ID\&. The search hierarchy ID identifies the list of UID files that MRM searches (in order) when performing subsequent fetch calls\&. .PP Each UID file string in \fIfile_names_list\fP can specify either a full pathname or a filename\&. If a UID file string has a leading / (slash), it specifies a full pathname, and MRM opens the file as specified\&. Otherwise, the UID file string specifies a filename\&. In this case MRM looks for the file along a search path specified by the \fBUIDPATH\fP environment variable or by a default search path, which varies depending on whether or not the \fBXAPPLRESDIR\fP environment variable is set\&. .PP The \fBUIDPATH\fP environment variable specifies a search path and naming conventions associated with UID files\&. It can contain the substitution field \fB%U\fP, where the UID file string from the \fIfile_names_list\fP argument to \fBMrmOpenHierarchyPerDisplay\fP is substituted for \fB%U\fP\&. It can also contain the substitution fields accepted by \fBXtResolvePathname\fP\&. The substitution field \fB%T\fP is always mapped to \fIuid\fP\&. The entire path is searched first with \fB%S\fP mapped to \fB\&.uid\fP\&. If no file is found, it is searched again with \fB%S\fP mapped to NULL\&. For example, the following \fBUIDPATH\fP value and \fBMrmOpenHierarchyPerDisplay\fP call cause MRM to open two separate UID files: .PP .nf \f(CWUIDPATH=/uidlib/%L/%U\&.uid:/uidlib/%U/%L static char *uid_files[] = {"/usr/users/me/test\&.uid", "test2"}; MrmHierarchy *Hierarchy_id; MrmOpenHierarchyPerDisplay((MrmCount)2,uid_files, NULL, Hierarchy_id)\fR .fi .PP .PP MRM opens the first file, \fB/usr/users/me/test\&.uid\fP, as specified in the \fIfile_names_list\fP argument to \fBMrmOpenHierarchyPerDisplay\fP, because the UID file string in the \fIfile_names_list\fP argument specifies a full pathname\&. MRM looks for the second file, \fBtest2\fP, first as \fB/uidlib/%L/test2\&.uid\fP and second as \fB/uidlib/test2/%L\fP, where the display\&'s language string is substituted for \fB%L\fP\&. .PP After \fBMrmOpenHierarchyPerDisplay\fP opens the UID hierarchy, you should not delete or modify the UID files until you close the UID hierarchy by calling \fBMrmCloseHierarchy\fP\&. .PP If \fBUIDPATH\fP is not set, but the environment variable \fBXAPPLRESDIR\fP is set, MRM searches the following pathnames: .IP " \(bu" 6 \fB%U%S\fP .IP " \(bu" 6 \fB$XAPPLRESDIR/%L/uid/%N/%U%S\fP .IP " \(bu" 6 \fB$XAPPLRESDIR/%l/uid/%N/%U%S\fP .IP " \(bu" 6 \fB$XAPPLRESDIR/uid/%N/%U%S\fP .IP " \(bu" 6 \fB$XAPPLRESDIR/%L/uid/%U%S\fP .IP " \(bu" 6 \fB$XAPPLRESDIR/%l/uid/%U%S\fP .IP " \(bu" 6 \fB$XAPPLRESDIR/uid/%U%S\fP .IP " \(bu" 6 \fB$HOME/uid/%U%S\fP .IP " \(bu" 6 \fB$HOME/%U%S\fP .IP " \(bu" 6 \fB/usr/lib/X11/%L/uid/%N/%U%S\fP .IP " \(bu" 6 \fB/usr/lib/X11/%l/uid/%N/%U%S\fP .IP " \(bu" 6 \fB/usr/lib/X11/uid/%N/%U%S\fP .IP " \(bu" 6 \fB/usr/lib/X11/%L/uid/%U%S\fP .IP " \(bu" 6 \fB/usr/lib/X11/%l/uid/%U%S\fP .IP " \(bu" 6 \fB/usr/lib/X11/uid/%U%S\fP .IP " \(bu" 6 \fB/usr/include/X11/uid/%U%S\fP .PP If neither \fBUIDPATH\fP nor \fBXAPPLRESDIR\fP is set, MRM searches the following pathnames: .IP " \(bu" 6 \fB%U%S\fP .IP " \(bu" 6 \fB$HOME/%L/uid/%N/%U%S\fP .IP " \(bu" 6 \fB$HOME/%l/uid/%N/%U%S\fP .IP " \(bu" 6 \fB$HOME/uid/%N/%U%S\fP .IP " \(bu" 6 \fB$HOME/%L/uid/%U%S\fP .IP " \(bu" 6 \fB$HOME/%l/uid/%U%S\fP .IP " \(bu" 6 \fB$HOME/uid/%U%S\fP .IP " \(bu" 6 \fB$HOME/%U%S\fP .IP " \(bu" 6 \fB/usr/lib/X11/%L/uid/%N/%U%S\fP .IP " \(bu" 6 \fB/usr/lib/X11/%l/uid/%N/%U%S\fP .IP " \(bu" 6 \fB/usr/lib/X11/uid/%N/%U%S\fP .IP " \(bu" 6 \fB/usr/lib/X11/%L/uid/%U%S\fP .IP " \(bu" 6 \fB/usr/lib/X11/%l/uid/%U%S\fP .IP " \(bu" 6 \fB/usr/lib/X11/uid/%U%S\fP .IP " \(bu" 6 \fB/usr/include/X11/uid/%U%S\fP .PP These paths are defaults that vendors may change\&. For example, a vendor may use different directories for \fB/usr/lib/X11\fP and \fB/usr/include/X11\fP\&. .PP The following substitutions are used in these paths: .IP "\fB%U\fP" 10 The UID file string, from the \fIfile_names_list\fP argument\&. .IP "\fB%N\fP" 10 The class name of the application\&. .IP "\fB%L\fP" 10 The display\&'s language string\&. This string is influenced by \fBXtSetLanguageProc\fP\&. The default string is determined by calling setlocale(\fBLC_ALL, NULL\fP)\&. .IP "\fB%l\fP" 10 The language component of the display\&'s language string\&. .IP "\fB%S\fP" 10 The suffix to the filename\&. The entire path is first searched with a suffix of \fB\&.uid\fP\&. If no file is found, it is searched again with a NULL suffix\&. .SH "RETURN" .PP This function returns one of the following status return constants: "MrmSUCCESS" "MrmNOT_FOUND" "MrmFAILURE" .IP "\fBMrmSUCCESS\fP" 10 The function executed successfully\&. .IP "\fBMrmNOT_FOUND\fP" 10 File not found\&. .IP "\fBMrmFAILURE\fP" 10 The function failed\&. .SH "RELATED" .PP \fBMrmCloseHierarchy\fP(3)\&. .\" created by instant / docbook-to-man, Sun 22 Dec 1996, 20:17