home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-bin / x11r6.1 / man / cat3 / xrmdestroydatabase.0 < prev    next >
Encoding:
Text File  |  1996-10-17  |  8.7 KB  |  265 lines

  1.  
  2.  
  3.  
  4. XrmGetFileDatabase(3X11)  XLIB FUNCTIONS XrmGetFileDatabase(3X11)
  5.  
  6.  
  7. NNAAMMEE
  8.        XrmGetFileDatabase, XrmPutFileDatabase, XrmGetString-
  9.        Database, XrmLocaleOfDatabase, XrmGetDatabase, XrmSet-
  10.        Database, XrmDestroyDatabase - retrieve and store resource
  11.        databases
  12.  
  13. SSYYNNTTAAXX
  14.        XrmDatabase XrmGetFileDatabase(_f_i_l_e_n_a_m_e)
  15.         char *_f_i_l_e_n_a_m_e;
  16.  
  17.        void XrmPutFileDatabase(_d_a_t_a_b_a_s_e, _s_t_o_r_e_d___d_b)
  18.         XrmDatabase _d_a_t_a_b_a_s_e;
  19.         char *_s_t_o_r_e_d___d_b;
  20.  
  21.        XrmDatabase XrmGetStringDatabase(_d_a_t_a)
  22.         char *_d_a_t_a;
  23.  
  24.        char *XrmLocaleOfDatabase(_d_a_t_a_b_a_s_e)
  25.          XrmDatabase _d_a_t_a_b_a_s_e;
  26.  
  27.        XrmDatabase XrmGetDatabase(_d_i_s_p_l_a_y)
  28.          Display *_d_i_s_p_l_a_y;
  29.  
  30.        void XrmSetDatabase(_d_i_s_p_l_a_y, _d_a_t_a_b_a_s_e)
  31.          Display *_d_i_s_p_l_a_y;
  32.          XrmDatabase _d_a_t_a_b_a_s_e;
  33.  
  34.        void XrmDestroyDatabase(_d_a_t_a_b_a_s_e)
  35.          XrmDatabase _d_a_t_a_b_a_s_e;
  36.  
  37. AARRGGUUMMEENNTTSS
  38.        _f_i_l_e_n_a_m_e     Specifies the resource database file name.
  39.  
  40.        _d_a_t_a_b_a_s_e     Specifies the database that is to be used.
  41.  
  42.        _s_t_o_r_e_d___d_b Specifies the file name for the stored database.
  43.  
  44.        _d_a_t_a     Specifies the database contents using a string.
  45.  
  46.        _d_a_t_a_b_a_s_e     Specifies the resource database.
  47.  
  48.        _d_i_s_p_l_a_y     Specifies the connection to the X server.
  49.  
  50. DDEESSCCRRIIPPTTIIOONN
  51.        The _X_r_m_G_e_t_F_i_l_e_D_a_t_a_b_a_s_e function opens the specified file,
  52.        creates a new resource database, and loads it with the
  53.        specifications read in from the specified file.    The spec-
  54.        ified file should contain a sequence of entries in valid
  55.        ResourceLine format (see section 15.1); the database that
  56.        results from reading a file with incorrect syntax is
  57.        implementation-dependent.  The file is parsed in the cur-
  58.        rent locale, and the database is created in the current
  59.        locale.    If it cannot open the specified file, _X_r_m_G_e_t_F_i_l_e_-
  60.        _D_a_t_a_b_a_s_e returns NULL.
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XrmGetFileDatabase(3X11)  XLIB FUNCTIONS XrmGetFileDatabase(3X11)
  71.  
  72.  
  73.        The _X_r_m_P_u_t_F_i_l_e_D_a_t_a_b_a_s_e function stores a copy of the spec-
  74.        ified database in the specified file.  Text is written to
  75.        the file as a sequence of entries in valid ResourceLine
  76.        format (see section 15.1).  The file is written in the
  77.        locale of the database.    Entries containing resource names
  78.        that are not in the Host Portable Character Encoding or
  79.        containing values that are not in the encoding of the
  80.        database locale, are written in an implementation-
  81.        dependent manner.  The order in which entries are written
  82.        is implementation-dependent.  Entries with representation
  83.        types other than ``String'' are ignored.
  84.  
  85.        The _X_r_m_G_e_t_S_t_r_i_n_g_D_a_t_a_b_a_s_e function creates a new database
  86.        and stores the resources specified in the specified null-
  87.        terminated string.  _X_r_m_G_e_t_S_t_r_i_n_g_D_a_t_a_b_a_s_e is similar to
  88.        _X_r_m_G_e_t_F_i_l_e_D_a_t_a_b_a_s_e except that it reads the information
  89.        out of a string instead of out of a file.  The string
  90.        should contain a sequence of entries in valid ResourceLine
  91.        format (see section 15.1) terminated by a null character;
  92.        the database that results from using a string with incor-
  93.        rect syntax is implementation-dependent.     The string is
  94.        parsed in the current locale, and the database is created
  95.        in the current locale.
  96.  
  97.        If database is NULL, _X_r_m_D_e_s_t_r_o_y_D_a_t_a_b_a_s_e returns immedi-
  98.        ately.
  99.  
  100.        The _X_r_m_L_o_c_a_l_e_O_f_D_a_t_a_b_a_s_e function returns the name of the
  101.        locale bound to the specified database, as a null-
  102.        terminated string.  The returned locale name string is
  103.        owned by Xlib and should not be modified or freed by the
  104.        client.    Xlib is not permitted to free the string until
  105.        the database is destroyed.  Until the string is freed, it
  106.        will not be modified by Xlib.
  107.  
  108.        The _X_r_m_G_e_t_D_a_t_a_b_a_s_e function returns the database associ-
  109.        ated with the specified display.     It returns NULL if a
  110.        database has not yet been set.
  111.  
  112.        The _X_r_m_S_e_t_D_a_t_a_b_a_s_e function associates the specified
  113.        resource database (or NULL) with the specified display.
  114.        The database previously associated with the display (if
  115.        any) is not destroyed.  A client or toolkit may find this
  116.        function convenient for retaining a database once it is
  117.        constructed.
  118.  
  119. FFIILLEE SSYYNNTTAAXX
  120.        The syntax of a resource file is a sequence of resource
  121.        lines terminated by newline characters or the end of the
  122.        file.  The syntax of an individual resource line is:
  123.  
  124.        ResourceLine   = Comment | IncludeFile | ResourceSpec | <empty line>
  125.        Comment          = "!" {<any character except null or newline>}
  126.        IncludeFile    = "#" WhiteSpace "include" WhiteSpace FileName WhiteSpace
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. XrmGetFileDatabase(3X11)  XLIB FUNCTIONS XrmGetFileDatabase(3X11)
  137.  
  138.  
  139.        FileName          = <valid filename for operating system>
  140.        ResourceSpec   = WhiteSpace ResourceName WhiteSpace ":" WhiteSpace Value
  141.        ResourceName   = [Binding] {Component Binding} ComponentName
  142.        Binding          = "." | "*"
  143.        WhiteSpace     = {<space> | <horizontal tab>}
  144.        Component      = "?" | ComponentName
  145.        ComponentName  = NameChar {NameChar}
  146.        NameChar          = "a"-"z" | "A"-"Z" | "0"-"9" | "_" | "-"
  147.        Value          = {<any character except null or unescaped newline>}
  148.  
  149.        Elements separated by vertical bar (|) are alternatives.
  150.        Curly braces ({...}) indicate zero or more repetitions of
  151.        the enclosed elements.  Square brackets ([...]) indicate
  152.        that the enclosed element is optional.  Quotes ("...") are
  153.        used around literal characters.
  154.  
  155.        IncludeFile lines are interpreted by replacing the line
  156.        with the contents of the specified file.     The word
  157.        ``include'' must be in lowercase.  The file name is inter-
  158.        preted relative to the directory of the file in which the
  159.        line occurs (for example, if the file name contains no
  160.        directory or contains a relative directory specification).
  161.  
  162.        If a ResourceName contains a contiguous sequence of two or
  163.        more Binding characters, the sequence will be replaced
  164.        with single ``.'' character if the sequence contains only
  165.        ``.'' characters; otherwise, the sequence will be replaced
  166.        with a single ``*'' character.
  167.  
  168.        A resource database never contains more than one entry for
  169.        a given ResourceName.  If a resource file contains multi-
  170.        ple lines with the same ResourceName, the last line in the
  171.        file is used.
  172.  
  173.        Any white space characters before or after the name or
  174.        colon in a ResourceSpec are ignored.  To allow a Value to
  175.        begin with white space, the two-character sequence
  176.        ``\_s_p_a_c_e'' (backslash followed by space) is recognized and
  177.        replaced by a space character, and the two-character
  178.        sequence ``\_t_a_b'' (backslash followed by horizontal tab)
  179.        is recognized and replaced by a horizontal tab character.
  180.        To allow a Value to contain embedded newline characters,
  181.        the two-character sequence ``\n'' is recognized and
  182.        replaced by a newline character.     To allow a Value to be
  183.        broken across multiple lines in a text file, the two-
  184.        character sequence ``\_n_e_w_l_i_n_e'' (backslash followed by
  185.        newline) is recognized and removed from the value.  To
  186.        allow a Value to contain arbitrary character codes, the
  187.        four-character sequence ``\_n_n_n'', where each _n is a digit
  188.        character in the range of ``0''-``7'', is recognized and
  189.        replaced with a single byte that contains the octal value
  190.        specified by the sequence.  Finally, the two-character
  191.        sequence ``\\'' is recognized and replaced with a single
  192.        backslash.
  193.  
  194.  
  195.  
  196. X Version 11           Release 6.1                3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. XrmGetFileDatabase(3X11)  XLIB FUNCTIONS XrmGetFileDatabase(3X11)
  203.  
  204.  
  205. SSEEEE AALLSSOO
  206.        XrmGetResource(3X11), XrmInitialize(3X11), XrmPutRe-
  207.        source(3X11)
  208.        _X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262. X Version 11           Release 6.1                4
  263.  
  264.  
  265.