]> git.ipfire.org Git - thirdparty/cups.git/blob - cups/array.h
Load cups into easysw/current.
[thirdparty/cups.git] / cups / array.h
1 /*
2 * "$Id: array.h 6477 2007-04-25 19:55:45Z mike $"
3 *
4 * Sorted array definitions for the Common UNIX Printing System (CUPS).
5 *
6 * Copyright 1997-2007 by Easy Software Products.
7 *
8 * These coded instructions, statements, and computer programs are the
9 * property of Easy Software Products and are protected by Federal
10 * copyright law. Distribution and use rights are outlined in the file
11 * "LICENSE.txt" which should have been included with this file. If this
12 * file is missing or damaged please contact Easy Software Products
13 * at:
14 *
15 * Attn: CUPS Licensing Information
16 * Easy Software Products
17 * 44141 Airport View Drive, Suite 204
18 * Hollywood, Maryland 20636 USA
19 *
20 * Voice: (301) 373-9600
21 * EMail: cups-info@cups.org
22 * WWW: http://www.cups.org
23 *
24 * This file is subject to the Apple OS-Developed Software exception.
25 */
26
27 #ifndef _CUPS_ARRAY_H_
28 # define _CUPS_ARRAY_H_
29
30 /*
31 * Include necessary headers...
32 */
33
34 # include <stdlib.h>
35
36
37 /*
38 * C++ magic...
39 */
40
41 # ifdef __cplusplus
42 extern "C" {
43 # endif /* __cplusplus */
44
45
46 /*
47 * Types and structures...
48 */
49
50 typedef struct _cups_array_s cups_array_t;
51 /**** CUPS array type ****/
52 typedef int (*cups_array_func_t)(void *first, void *second, void *data);
53 /**** Array comparison function ****/
54 typedef int (*cups_ahash_func_t)(void *element, void *data);
55 /**** Array hash function ****/
56
57
58 /*
59 * Functions...
60 */
61
62 extern int cupsArrayAdd(cups_array_t *a, void *e);
63 extern void cupsArrayClear(cups_array_t *a);
64 extern int cupsArrayCount(cups_array_t *a);
65 extern void *cupsArrayCurrent(cups_array_t *a);
66 extern void cupsArrayDelete(cups_array_t *a);
67 extern cups_array_t *cupsArrayDup(cups_array_t *a);
68 extern void *cupsArrayFind(cups_array_t *a, void *e);
69 extern void *cupsArrayFirst(cups_array_t *a);
70 extern int cupsArrayGetIndex(cups_array_t *a);
71 extern int cupsArrayGetInsert(cups_array_t *a);
72 extern void *cupsArrayIndex(cups_array_t *a, int n);
73 extern int cupsArrayInsert(cups_array_t *a, void *e);
74 extern void *cupsArrayLast(cups_array_t *a);
75 extern cups_array_t *cupsArrayNew(cups_array_func_t f, void *d);
76 extern cups_array_t *cupsArrayNew2(cups_array_func_t f, void *d,
77 cups_ahash_func_t h, int hsize);
78 extern void *cupsArrayNext(cups_array_t *a);
79 extern void *cupsArrayPrev(cups_array_t *a);
80 extern int cupsArrayRemove(cups_array_t *a, void *e);
81 extern void *cupsArrayRestore(cups_array_t *a);
82 extern int cupsArraySave(cups_array_t *a);
83 extern void *cupsArrayUserData(cups_array_t *a);
84
85 # ifdef __cplusplus
86 }
87 # endif /* __cplusplus */
88 #endif /* !_CUPS_ARRAY_H_ */
89
90 /*
91 * End of "$Id: array.h 6477 2007-04-25 19:55:45Z mike $".
92 */