Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
catopen(3C)							   catopen(3C)

NAME
       catopen(), catclose() - open and	close a	message	catalog	for reading

SYNOPSIS
DESCRIPTION
       The  function opens a message catalog and returns a catalog descriptor.
       The specifies the name of the message catalog being opened.  A contain-
       ing  a slash specifies a	path name for the message catalog.  Otherwise,
       the environment variable	is used	(see environ(5)).  If  specifies  more
       than  one  path,	 returns  the catalog descriptor for the first path on
       which it	is able	to successfully	open the  specified  message  catalog.
       If does not exist in the	environment, or	if a message catalog cannot be
       opened for any path, uses a system-wide default path.  The  default  is
       affected	 by if the value of is If the value of is zero,	the default is
       affected	by the environment variable See	environ(5) for details.

       If is invoked from a or application with	owner  root,  the  environment
       variable	 is  not  used to locate message catalogs.  Instead the	system
       file is used to locate the message catalogs.  See  nlspath(4)  for  de-
       tails.

       A  message  catalog  descriptor	remains	 valid	in a process until the
       process closes it, or until a successful	call to	one of the  functions.
       A  change  in  the setting of the category may invalidate existing open
       catalogs.

       If a file descriptor is used to implement message catalog  descriptors,
       the flag	will be	set.

       If is zero, the environment variable is used to locate the catalog.  If
       is the category is used to locate the message catalog only  if  a  suc-
       cessful	call  to has been made prior to	the call to The	result of set-
       ting to any other value is undefined.

       The function closes the message catalog a  message  catalog  descriptor
       returned	from an	earlier	successful call	to

RETURN VALUE
       Upon success, returns a message catalog descriptor.  Otherwise, returns
       a value of (nl_catd)-1 and sets to indicate the error.

       Upon success, returns zero.  Otherwise, returns -1 and sets to indicate
       the error.

ERRORS
       fails without opening a message catalog,	and sets for the last path at-
       tempted under any of the	following conditions:

	      [EACCES]		     A component of  the  path	prefix	denies
				     search  permission, or read permission is
				     denied for	the named file.

	      [EMFILE]		     The maximum number	 of  file  descriptors
				     allowed are currently open.

	      [ENAMETOOLONG]	     The length	of the specified path name ex-
				     ceeds bytes, or the length	of a component
				     of	 the  path name	exceeds	bytes while is
				     in	effect.

	      [ENFILE]		     The system	file table is full.

	      [ENOENT]		     The named catalog does not	exist  or  the
				     path is null.

	      [ENOTDIR]		     A	component  of the path prefix is not a
				     directory.

       can be used to provide default messages when called following a	failed
       (see  catgets(3C)).   returns  its parameter if it is passed an invalid
       catalog descriptor.

       fails if	the following is true:

	      [EBADF]		     is	not a valid open message  catalog  de-
				     scriptor.

WARNINGS
       When using does not provide a default value for

AUTHOR
       and were	developed by HP.

FILES
       Message catalog default path for	core HP-UX products only.

SEE ALSO
       catgets(3C), setlocale(3C), nlspath(4), environ(5), thread_safety(5).

STANDARDS CONFORMANCE
								   catopen(3C)

NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | ERRORS | WARNINGS | AUTHOR | FILES | SEE ALSO | STANDARDS CONFORMANCE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=catopen&sektion=3c&manpath=HP-UX+11.22>

home | help