Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dwtopenhierarchy(3dwt) [ultrix man page]

DwtOpenHierarchy(3Dwt)													    DwtOpenHierarchy(3Dwt)

Name
       DwtOpenHierarchy - Allocates a hierarchy ID and opens all the UID files in the hierarchy.

Syntax
       #include <X11/DwtAppl.h>
       Cardinal DwtOpenHierarchy(num_files, file_names_list, ancillary_structures_list,
				 hierarchy_id_return)
	    DRMCount num_files;
	    String file_names_list [];
	    IDBOSOpenParamPtr *ancillary_structures_list;
	    DRMHierarchy *hierarchy_id_return;

Arguments
       num_files Specifies the number of files in the name list.

       file_names_list
		 Specifies an array of pointers to character strings that identify the .uid files.

       ancillary_structures_list
		 A list of operating system-dependent ancillary structures corresponding to such things as file names, clobber flag, and so forth.
		 This argument should be NULL for most operations.  If you need to reference this structure,  see  the	definition  of	IDBOSOpen-
		 ParamPtr in DwtAppl.h for more information.

       hierarchy_id_return
		 Returns  the search hierarchy ID.  The search hierarchy ID identifies the list of .uid files that DRM will search (in order) when
		 performing subsequent fetch calls.

Description
       The DwtOpenHierarchy function allows the user to specify the list of UID files that DRM will search in subsequent  fetch  operations.   All
       subsequent  fetch  operations  will  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 DwtOpenHierarchy encounters any errors during its
       execution, any files that were opened are closed.

       Each UID file specified in file_names_list can specify either a full directory pathname or a file name.	If a UID file does not specify the
       pathname it will not contain any embedded slashes (/),  and it will be accessed through the UIDPATH environment variable.

       The  UIDPATH environment variable specifies search paths and naming conventions associated with UID files.  It can contain the substitution
       fields %L and %N, where the current setting of the LANG environment variable is substituted for %L and the .uid name passed to DwtOpenHier-
       archy  is  substituted  for  %N.   For  example, the following UID path and DwtOpenHierarchy call would cause DRM to open two separate .uid
       files:

	UIDPATH=/uidlib/%L/%N.uid:/uidlib/%N/%L
	 static char *uid_files[] = {"/usr/users/me/test.uid", "test2"};
	  DRMHierarchy	*Hierarchy_id;
	  DwtOpenHierarchy((DRMCount)2,uid_files, NULL, Hierarchy_id)

       The first file, /usr/users/me/test.uid, would be opened as specified, as this file specification includes a  pathname.	The  second  file,
       test2, would be looked for first in /uidlib/$LANG/test2.uid, and second in /uidlib/test2/$LANG.

       After  DwtOpenHierarchy opens the UID hierarchy, you should not delete or modify the UID files until you close the UID hierarchy by calling
       DwtCloseHierarchy.

Return Values
       This function returns one of these status return constants:

       DRMSuccess	 The   function   executed
			 successfully.
       DRMNotFound	 File not found.
       DRMFailure	 The function failed.

See Also
       DwtCloseHierarchy(3Dwt)

															    DwtOpenHierarchy(3Dwt)

Check Out this Related Man Page

MrmOpenHierarchy(library call)											    MrmOpenHierarchy(library call)

NAME
MrmOpenHierarchy -- Allocates a hierarchy ID and opens all the UID files in the hierarchy SYNOPSIS
#include <Mrm/MrmPublic.h> Cardinal MrmOpenHierarchy( MrmCount num_files, String file_names_list[], MrmOsOpenParamPtr *ancillary_structures_list, MrmHierarchy *hierarchy_id); DESCRIPTION
This routine is obsolete and exists for compatibility with previous releases. It is replaced by MrmOpenHierarchyPerDisplay. MrmOpenHierar- chy is identical to MrmOpenHierarchyPerDisplay except that MrmOpenHierarchy does not take a display argument. num_files Specifies the number of files in the name list. file_names_list Specifies an array of character strings that identify the UID files. ancillary_structures_list 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 MrmOsOpen- ParamPtr in the MrmPublic.h header file for more information. hierarchy_id Returns the search hierarchy ID. The search hierarchy ID identifies the list of UID files that MRM searches (in order) when per- forming subsequent fetch calls. Each UID file string in file_names_list 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 UIDPATH environment variable or by a default search path, which varies depending on whether or not the XAPPLRESDIR environment variable is set. The UIDPATH environment variable specifies a search path and naming conventions associated with UID files. It can contain the substitution field %U, where the UID file string from the file_names_list argument to MrmOpenHierarchyPerDisplay is substituted for %U. It can also contain the substitution fields accepted by XtResolvePathname. The substitution field %T is always mapped to uid. The entire path is first searched with %S mapped to .uid. If no file is found, it is searched again with %S mapped to NULL. If no display is set prior to calling this function, the result of this function's call to XtResolvePathname is undefined. For example, the following UIDPATH value and MrmOpenHierarchy call cause MRM to open two separate UID files: UIDPATH=/uidlib/%L/%U.uid:/uidlib/%U/%L static char *uid_files[] = {"/usr/users/me/test.uid", "test2"}; MrmHierarchy *Hierarchy_id; MrmOpenHierarchy((MrmCount)2,uid_files, NULL, Hierarchy_id) MRM opens the first file, /usr/users/me/test.uid, as specified in the file_names_list argument to MrmOpenHierarchy, because the UID file string in the file_names_list argument specifies a full pathname. MRM looks for the second file, test2, first as /uidlib/%L/test2.uid and second as /uidlib/test2/%L, where the display's language string is substituted for %L. After MrmOpenHierarchy opens the UID hierarchy, you should not delete or modify the UID files until you close the UID hierarchy by calling MrmCloseHierarchy. If UIDPATH is not set but the environment variable XAPPLRESDIR is set, MRM searches the following pathnames: o %U%S o $XAPPLRESDIR/%L/uid/%N/%U%S o $XAPPLRESDIR/%l/uid/%N/%U%S o $XAPPLRESDIR/uid/%N/%U%S o $XAPPLRESDIR/%L/uid/%U%S o $XAPPLRESDIR/%l/uid/%U%S o $XAPPLRESDIR/uid/%U%S o $HOME/uid/%U%S o $HOME/%U%S o /usr/lib/X11/%L/uid/%N/%U%S o /usr/lib/X11/%l/uid/%N/%U%S o /usr/lib/X11/uid/%N/%U%S o /usr/lib/X11/%L/uid/%U%S o /usr/lib/X11/%l/uid/%U%S o /usr/lib/X11/uid/%U%S o /usr/include/X11/uid/%U%S If neither UIDPATH nor XAPPLRESDIR is set, MRM searches the following pathnames: o %U%S o HOME/%L/uid/%N/%U%S o HOME/%l/uid/%N/%U%S o $HOME/uid/%N/%U%S o $HOME/%L/uid/%U%S o $HOME/%l/uid/%U%S o $HOME/uid/%U%S o $HOME/%U%S o /usr/lib/X11/%L/uid/%N/%U%S o /usr/lib/X11/%l/uid/%N/%U%S o /usr/lib/X11/uid/%N/%U%S o /usr/lib/X11/%L/uid/%U%S o /usr/lib/X11/%l/uid/%U%S o /usr/lib/X11/uid/%U%S o /usr/include/X11/uid/%U%S These paths are defaults that vendors may change. For example, a vendor may use different directories for /usr/lib/X11 and /usr/include/X11. The following substitutions are used in these paths: %U The UID file string, from the file_names_list argument. %N The class name of the application. %L The display's language string. This string is influenced by XtSetLanguageProc. The default string is determined by calling set- locale(LC_ALL, NULL). %l The language component of the display's language string. %S The suffix to the filename. The entire path is first searched with a suffix of .uid. If no file is found, it is searched again with a NULL suffix. RETURN
This function returns one of the following status return constants: MrmSUCCESS The function executed successfully. MrmNOT_FOUND File not found. MrmFAILURE The function failed. RELATED
MrmOpenHierarchyPerDisplay(3) and MrmCloseHierarchy(3). MrmOpenHierarchy(library call)
Man Page