Blame doc/man/man3/MrmOpenHierarchyPerDisplay.3

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