<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
                   "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<!-- lifted from troff+man by doclifter -->
<refentry id='xputresman'>
<!--  Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium -->

<!--  Permission is hereby granted, free of charge, to any person obtaining -->
<!--  a copy of this software and associated documentation files (the -->
<!--  "Software"), to deal in the Software without restriction, including -->
<!--  without limitation the rights to use, copy, modify, merge, publish, -->
<!--  distribute, sublicense, and/or sell copies of the Software, and to -->
<!--  permit persons to whom the Software is furnished to do so, subject to -->
<!--  the following conditions: -->

<!--  The above copyright notice and this permission notice shall be included -->
<!--  in all copies or substantial portions of the Software. -->

<!--  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -->
<!--  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -->
<!--  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -->
<!--  IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR -->
<!--  OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -->
<!--  ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -->
<!--  OTHER DEALINGS IN THE SOFTWARE. -->

<!--  Except as contained in this notice, the name of the X Consortium shall -->
<!--  not be used in advertising or otherwise to promote the sale, use or -->
<!--  other dealings in this Software without prior written authorization -->
<!--  from the X Consortium. -->

<!--  Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by -->
<!--  Digital Equipment Corporation -->

<!--  Portions Copyright \(co 1990, 1991 by -->
<!--  Tektronix, Inc. -->

<!--  Permission to use, copy, modify and distribute this documentation for -->
<!--  any purpose and without fee is hereby granted, provided that the above -->
<!--  copyright notice appears in all copies and that both that copyright notice -->
<!--  and this permission notice appear in all copies, and that the names of -->
<!--  Digital and Tektronix not be used in in advertising or publicity pertaining -->
<!--  to this documentation without specific, written prior permission. -->
<!--  Digital and Tektronix makes no representations about the suitability -->
<!--  of this documentation for any purpose. -->
<!--  It is provided ``as is'' without express or implied warranty. -->
<!--   -->
<!--  $XFree86: xc/doc/man/X11/XPutRes.man,v 1.5 2003/08/04 10:32:20 eich Exp $ -->

<!-- .na -->
<!-- FD listing suppressed (not used) -->
<!-- FN listing suppressed (not used) -->
<!-- IN listing suppressed (not used) -->
<!-- C{ listing suppressed (not used) -->
<!-- C} listing suppressed (not used) -->
<!-- Pn listing suppressed (not used) -->
<!-- hN listing suppressed (not used) -->
<!-- NT listing suppressed (not used) -->
<!-- .		\" Note End \-\- doug kraft 3/85 -->
<!-- NE listing suppressed (not used) -->
<!-- .ny0 -->
<refmeta>
<refentrytitle>XrmPutResource</refentrytitle>
<manvolnum>3X11</manvolnum>
<refmiscinfo class='date'>__xorgversion__</refmiscinfo>
<refmiscinfo class='source'>XLIB FUNCTIONS</refmiscinfo>
</refmeta>
<refnamediv id='name'>
<refname>XrmPutResource</refname>
<refname>XrmQPutResource</refname>
<refname>XrmPutStringResource</refname>
<refname>XrmQPutStringResource</refname>
<refname>XrmPutLineResource</refname>
<refpurpose>store database resources</refpurpose>
</refnamediv>
<!-- body begins here -->

<refsect1 id='syntax'><title>SYNTAX</title>

<para>void XrmPutResource&hairsp;(&hairsp;XrmDatabase *<emphasis remap='I'>database</emphasis>&hairsp;, char
*<emphasis remap='I'>specifier</emphasis>&hairsp;, char *<emphasis remap='I'>type</emphasis>&hairsp;, XrmValue *<emphasis remap='I'>value</emphasis>&hairsp;);</para> 

<para>void XrmQPutResource&hairsp;(&hairsp;XrmDatabase *<emphasis remap='I'>database</emphasis>&hairsp;, XrmBindingList
<emphasis remap='I'>bindings</emphasis>&hairsp;, XrmQuarkList <emphasis remap='I'>quarks</emphasis>&hairsp;, XrmRepresentation <emphasis remap='I'>type</emphasis>&hairsp;,
XrmValue *<emphasis remap='I'>value</emphasis>&hairsp;);</para> 

<para>void XrmPutStringResource&hairsp;(&hairsp;XrmDatabase *<emphasis remap='I'>database</emphasis>&hairsp;, char
*<emphasis remap='I'>specifier</emphasis>&hairsp;, char *<emphasis remap='I'>value</emphasis>&hairsp;);</para> 

<para>void XrmQPutStringResource&hairsp;(&hairsp;XrmDatabase *<emphasis remap='I'>database</emphasis>&hairsp;, XrmBindingList
<emphasis remap='I'>bindings</emphasis>&hairsp;, XrmQuarkList <emphasis remap='I'>quarks</emphasis>&hairsp;, char *<emphasis remap='I'>value</emphasis>&hairsp;);</para> 

<para>void XrmPutLineResource&hairsp;(&hairsp;XrmDatabase *<emphasis remap='I'>database</emphasis>&hairsp;, char
*<emphasis remap='I'>line</emphasis>&hairsp;);</para> 
</refsect1>

<refsect1 id='arguments'><title>ARGUMENTS</title>
<variablelist remap='IP'>
  <varlistentry>
  <term><emphasis remap='I'>bindings</emphasis></term>
  <listitem>
<para>Specifies a list of bindings.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>database</emphasis></term>
  <listitem>
<para>Specifies the resource database.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>line</emphasis></term>
  <listitem>
<para>Specifies the resource name and value pair as a single string.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>quarks</emphasis></term>
  <listitem>
<para>Specifies the complete or partial name or the class list of the resource.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>specifier</emphasis></term>
  <listitem>
<para>Specifies a complete or partial specification of the resource.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>type</emphasis></term>
  <listitem>
<para>Specifies the type of the resource.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>value</emphasis></term>
  <listitem>
<para>Specifies the value of the resource, which is specified as a string.</para>
  </listitem>
  </varlistentry>
</variablelist>
</refsect1>

<refsect1 id='description'><title>DESCRIPTION</title>
<para>If database contains NULL,
<emphasis remap='I'>&hairsp;XrmPutResource&hairsp;</emphasis>
creates a new database and returns a pointer to it.
<emphasis remap='I'>&hairsp;XrmPutResource&hairsp;</emphasis>
is a convenience function that calls
<emphasis remap='I'>&hairsp;XrmStringToBindingQuarkList&hairsp;</emphasis>
followed by:</para>

<literallayout remap='.nf'>
<!-- .D   -->

<!-- .ps \n(PS -->
<!-- .if \n(VS&gt;=40 .vs \n(VSu -->
<!-- .if \n(VS&lt;=39 .vs \n(VSp -->
XrmQPutResource(database, bindings, quarks, XrmStringToQuark(type), value)
<!-- .ce 0  IGNORED -->
<!-- .in \n(OIu  IGNORED -->

</literallayout> <!-- .fi -->

<para>If the specifier and type are not in the Host Portable Character Encoding,
the result is implementation-dependent.
The value is stored in the database without modification.</para>

<para>If database contains NULL,
<emphasis remap='I'>&hairsp;XrmQPutResource&hairsp;</emphasis>
creates a new database and returns a pointer to it.
If a resource entry with the identical bindings and quarks already
exists in the database, the previous type and value are replaced by the new
specified type and value.
The value is stored in the database without modification.</para>

<para>If database contains NULL,
<emphasis remap='I'>&hairsp;XrmPutStringResource&hairsp;</emphasis>
creates a new database and returns a pointer to it.
<emphasis remap='I'>&hairsp;XrmPutStringResource&hairsp;</emphasis>
adds a resource with the specified value to the specified database.
<emphasis remap='I'>&hairsp;XrmPutStringResource&hairsp;</emphasis>
is a convenience function that first calls
<emphasis remap='I'>&hairsp;XrmStringToBindingQuarkList&hairsp;</emphasis>
on the specifier and then calls
<emphasis remap='I'>&hairsp;XrmQPutResource&hairsp;</emphasis>,
using a &ldquo;String&rdquo; representation type.
If the specifier is not in the Host Portable Character Encoding,
the result is implementation-dependent.
The value is stored in the database without modification.</para>

<para>If database contains NULL,
<emphasis remap='I'>&hairsp;XrmQPutStringResource&hairsp;</emphasis>
creates a new database and returns a pointer to it.
<emphasis remap='I'>&hairsp;XrmQPutStringResource&hairsp;</emphasis>
is a convenience routine that constructs an
<emphasis remap='I'>&hairsp;XrmValue&hairsp;</emphasis>
for the value string (by calling
<emphasis remap='I'>&hairsp;strlen&hairsp;</emphasis>
to compute the size) and
then calls
<emphasis remap='I'>&hairsp;XrmQPutResource&hairsp;</emphasis>,
using a &ldquo;String&rdquo; representation type.
The value is stored in the database without modification.</para>

<para>If database contains NULL,
<emphasis remap='I'>&hairsp;XrmPutLineResource&hairsp;</emphasis>
creates a new database and returns a pointer to it.
<emphasis remap='I'>&hairsp;XrmPutLineResource&hairsp;</emphasis>
adds a single resource entry to the specified database.
The line should be in valid ResourceLine format (see section 15.1)
terminated by a newline or null character;
the database that results from using a string
with incorrect syntax is implementation-dependent.
The string is parsed in the locale of the database.
If the
<emphasis remap='I'>&hairsp;ResourceName&hairsp;</emphasis>
is not in the Host Portable Character Encoding,
the result is implementation-dependent.
Note that comment lines are not stored.</para>
</refsect1>

<refsect1 id='see_also'><title>SEE ALSO</title>
<para>XrmGetResource(3X11),
XrmInitialize(3X11),
XrmMergeDatabases(3X11),
XrmUniqueQuark(3X11)
<!-- .br -->
<userinput>Xlib - C Language X Interface</userinput></para>
</refsect1>
</refentry>

