]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | <!-- |
bc44d920 | 2 | "$Id: api-array.shtml 6649 2007-07-11 21:46:42Z mike $" |
ef416fc2 | 3 | |
4 | Array API introduction for the Common UNIX Printing System (CUPS). | |
5 | ||
bc44d920 | 6 | Copyright 2007 by Apple Inc. |
7 | Copyright 1997-2006 by Easy Software Products, all rights reserved. | |
ef416fc2 | 8 | |
9 | These coded instructions, statements, and computer programs are the | |
bc44d920 | 10 | property of Apple Inc. and are protected by Federal copyright |
11 | law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
12 | which should have been included with this file. If this file is | |
13 | file is missing or damaged, see the license at "http://www.cups.org/". | |
ef416fc2 | 14 | --> |
15 | ||
16 | <h2 class='title'>Introduction</h2> | |
17 | ||
18 | <p>The CUPS array API provides a high-performance generic array | |
19 | container. The contents of the array container can be sorted and | |
20 | the container itself is designed for optimal speed and memory | |
21 | usage under a wide variety of conditions.</p> | |
22 | ||
23 | <p>The CUPS scheduler (<tt>cupsd</tt>) and many of the CUPS API | |
24 | functions use the array API to efficiently manage large lists of | |
25 | data.</p> | |
26 | ||
27 | <h2 class='title'>General Usage</h2> | |
28 | ||
29 | <p>The <var><cups/array.h></var> header file must be | |
30 | included to use the <tt>cupsArray</tt> functions.</p> | |
31 | ||
32 | <p>Programs using these functions must be linked to the CUPS | |
33 | library: <var>libcups.a</var>, <var>libcups.so.2</var>, | |
34 | <var>libcups.2.dylib</var>, <var>libcups_s.a</var>, or | |
35 | <var>libcups2.lib</var> depending on the platform. The following | |
36 | command compiles <var>myprogram.c</var> using GCC and the CUPS | |
37 | library:</p> | |
38 | ||
39 | <pre class='command'> | |
40 | <kbd>gcc -o myprogram myprogram.c -lcups</kbd> | |
41 | </pre> | |
42 | ||
43 | <h2 class='title'>Compatibility</h2> | |
44 | ||
45 | <p>All of these functions require CUPS 1.2 or higher.</p> |