<h4>Description</h4>
<p>Add a destination to the list of destinations.
-Use the cupsSaveDests() function to save the updated list of destinations
-to the user's lpoptions file.</p>
+This function cannot be used to add a new class or printer queue,
+it only adds a new container of saved options for the named
+destination or instance.
+
+If the named destination already exists, the destination list is
+returned unchanged. Adding a new instance of a destination creates
+a copy of that destination's options.
+
+Use the cupsSaveDests() function to save the updated list of
+destinations to the user's lpoptions file.</p>
<h4>Syntax</h4>
<pre>
int
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
-<tr><td><tt>name</tt></td><td>Name of destination</td></tr>
-<tr><td><tt>instance</tt></td><td>Instance of destination or NULL for none/primary</td></tr>
+<tr><td><tt>name</tt></td><td>Destination name</td></tr>
+<tr><td><tt>instance</tt></td><td>Instance name or NULL for none/primary</td></tr>
<tr><td><tt>num_dests</tt></td><td>Number of destinations</td></tr>
<tr><td><tt>dests</tt></td><td>Destinations</td></tr>
</tbody></table></div>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
-<tr><td><tt>name</tt></td><td>Name of destination</td></tr>
-<tr><td><tt>instance</tt></td><td>Instance of destination</td></tr>
+<tr><td><tt>name</tt></td><td>Destination name or NULL for the default destination</td></tr>
+<tr><td><tt>instance</tt></td><td>Instance name or NULL</td></tr>
<tr><td><tt>num_dests</tt></td><td>Number of destinations</td></tr>
<tr><td><tt>dests</tt></td><td>Destinations</td></tr>
</tbody></table></div>
Starting with CUPS 1.2, the returned list of destinations include the
printer-info, printer-is-accepting-jobs, printer-is-shared,
printer-make-and-model, printer-state, printer-state-change-time,
-printer-state-reasons, and printer-type attributes as options.</p>
+printer-state-reasons, and printer-type attributes as options.
+
+Use the cupsFreeDests() function to free the destination list and
+the cupsGetDest() function to find a particular destination.</p>
<h4>Syntax</h4>
<pre>
int
printer-make-and-model, printer-state, printer-state-change-time,
printer-state-reasons, and printer-type attributes as options.
+Use the cupsFreeDests() function to free the destination list and
+the cupsGetDest() function to find a particular destination.
+
</p>
<h4>Syntax</h4>
<pre>
<!-- NEW PAGE -->
<h3 class='title'><a name='cupsTempFd'>cupsTempFd()</a></h3>
<h4>Description</h4>
-<p>Create a temporary file.
+<p>Creates a temporary file.
-The temporary filename is stored in the filename buffer.</p>
+The temporary filename is returned in the filename buffer.
+The temporary file is opened for reading and writing.</p>
<h4>Syntax</h4>
<pre>
int
<tr><td><tt>len</tt></td><td>Size of buffer</td></tr>
</tbody></table></div>
<h4>Returns</h4>
-<p>New file descriptor</p>
+<p>New file descriptor or -1 on error</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> DEPRECATED </span><a name='cupsTempFile'>cupsTempFile()</a></h3>
<h4>Description</h4>
-<p>Generate a temporary filename.
+<p>Generates a temporary filename.
-The temporary filename is stored in the filename buffer.
+The temporary filename is returned in the filename buffer.
This function is deprecated - use cupsTempFd() or cupsTempFile2()
instead.
<tr><td><tt>len</tt></td><td>Size of buffer</td></tr>
</tbody></table></div>
<h4>Returns</h4>
-<p>Filename</p>
+<p>Filename or NULL on error</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='cupsTempFile2'>cupsTempFile2()</a></h3>
<h4>Description</h4>
-<p>Create a temporary CUPS file.
+<p>Creates a temporary CUPS file.
-The temporary filename is stored in the filename buffer.
+The temporary filename is returned in the filename buffer.
+The temporary file is opened for writing.
</p>
<h4>Syntax</h4>