Go to main content

man pages section 3: Library Interfaces and Headers

Exit Print View

Updated: Thursday, June 13, 2019
 
 

idn_nameinit (3)

Name

idn_nameinit - initialize libidnkit or libidnkitelite library

Synopsis

#include <idn/api.h>

idn_result_t
idn_nameinit(int load_file);

Description

idn_nameinit(3)            Library Functions Manual            idn_nameinit(3)



NAME
       idn_nameinit - initialize libidnkit or libidnkitelite library

SYNOPSIS
       #include <idn/api.h>

       idn_result_t
       idn_nameinit(int load_file);


DESCRIPTION
       The  idn_nameinit() function initializes the libidnkit or libidnkitlite
       library.  If load_file is not 0, it tries to read a default  configura-
       tion file.  If load_file is 0, it assumes no default configuration file
       exists (see idn2.conf(5) for details).

       Even if idn_nameinit() is called more  than  once,  the  initialization
       will take place only at the first call.

       Upon   success,  idn_nameinit()  returns  idn_success.   Otherwise,  it
       returns an error code.  See  idn_result_tostring(3)  for  the  complete
       list of error codes.

       When  one of the following functions is called prior to idn_nameinit(),
       an  initialization  will  implicitly  take  place.    In   this   case,
       idn_nameinit(0) is internally performed as the initialization.

         - idn_encodename()

         - idn_decodename()

         - idn_decodename2()

         - idn_comparenames()

         - idn_comparenames2()

         - idn_checkname()

         - idn_setlocalencoding()

         - idn_setlanguage()

         - idn_setlocalcheckfile()



ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+------------------------------+
       |ATTRIBUTE TYPE |       ATTRIBUTE VALUE        |
       +---------------+------------------------------+
       |Availability   | library/idnkit/header-idnkit |
       +---------------+------------------------------+
       |Stability      | Committed                    |
       +---------------+------------------------------+
NOTES
       To avoid potential security issues, the library functions will check if
       the configuration files are in a proper access mode (0444)  and  owner-
       ship  (root:sys).  If  they are not in the proper access mode or owner-
       ship, the function will not read and use the configurations defined  in
       the  files, but use the default values. In this case, a warning message
       will be issued, for example:

         idn_nameinit: warning: config file (@sysconfdir@/idn2.conf) not in proper
                                access mode or ownership - the file ignored.


       In the same security concern, while  they  are  mentioned  in  the  man
       pages,  all  user  configuration  files (i.e., $(HOME)/.idn2rc) will be
       ignored as if the files do not exist.


SEE ALSO
       libidnkit(3), idn_checkname(3), idn_comparenames(3), idn_decodename(3),
       idn_encodename(3),  idn_nameinit(3),  idn_result_tostring(3),  idn_set-
       language(3),     idn_setlocalencoding(3),     idn_setlocalcheckfile(3),
       idn_result_tostring(3), idn2.conf(5)


       This     software     was    built    from    source    available    at
       https://github.com/oracle/solaris-userland.   The  original   community
       source was downloaded from  https://jprs.co.jp/idn/idnkit-2.3.tar.bz2

       Further information about this software can be found on the open source
       community website at https://jprs.co.jp/idn.



                                 Sep 21, 2012                  idn_nameinit(3)