<!--
"$Id: api-cups.shtml 7337 2008-02-22 04:44:04Z mike $"
- CUPS API introduction for the Common UNIX Printing System (CUPS).
+ API introduction for CUPS.
- Copyright 2007-2010 by Apple Inc.
+ Copyright 2007-2013 by Apple Inc.
Copyright 1997-2006 by Easy Software Products, all rights reserved.
These coded instructions, statements, and computer programs are the
int num_dests = <a href='#cupsGetDests'>cupsGetDests</a>(&dests);
<a href='#cups_dest_t'>cups_dest_t</a> *dest = <a href='#cupsGetDest'>cupsGetDest</a>("name", NULL, num_dests, dests);
-/* do something wiith dest */
+/* do something with dest */
<a href='#cupsFreeDests'>cupsFreeDests</a>(num_dests, dests);
</pre>
<a href='#cups_option_t'>cups_option_t</a> *options = NULL;
<a href='#cups_dest_t'>cups_dest_t</a> *dest;
-for (i = 0; i < dest->num_options; i ++)
+for (i = 0; i < dest->num_options; i ++)
num_options = <a href='#cupsAddOption'>cupsAddOption</a>(dest->options[i].name, dest->options[i].value,
num_options, &options);
</pre>
<p>Finally, the <a href='#cupsCreateJob'><code>cupsCreateJob</code></a>
function creates a new job with no files in it. Files are added using the
-<a href='#cupsStartDocument'><code>cupsStartDocument</code></a>,
+<a href='#cupsStartDocument'><code>cupsStartDocument</code></a>,
<a href='api-httpipp.html#cupsWriteRequestData'><code>cupsWriteRequestData</code></a>,
and <a href='#cupsFinishDocument'><code>cupsFinishDocument</code></a> functions.
The following example creates a job with 10 text files for printing:</p>
<a href='#cups_job_t'>cups_job_t</a> *jobs;
int i;
ipp_jstate_t job_state = IPP_JOB_PENDING;
-
+
while (job_state < IPP_JOB_STOPPED)
{
/* Get my jobs (1) with any state (-1) */