]> git.ipfire.org Git - thirdparty/cups.git/blame - cups/array.h
Load cups into easysw/current.
[thirdparty/cups.git] / cups / array.h
CommitLineData
ef416fc2 1/*
b94498cf 2 * "$Id: array.h 6477 2007-04-25 19:55:45Z mike $"
ef416fc2 3 *
4 * Sorted array definitions for the Common UNIX Printing System (CUPS).
5 *
b94498cf 6 * Copyright 1997-2007 by Easy Software Products.
ef416fc2 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
42extern "C" {
43# endif /* __cplusplus */
44
45
46/*
47 * Types and structures...
48 */
49
50typedef struct _cups_array_s cups_array_t;
51 /**** CUPS array type ****/
52typedef int (*cups_array_func_t)(void *first, void *second, void *data);
53 /**** Array comparison function ****/
b94498cf 54typedef int (*cups_ahash_func_t)(void *element, void *data);
55 /**** Array hash function ****/
56
ef416fc2 57
58/*
59 * Functions...
60 */
61
62extern int cupsArrayAdd(cups_array_t *a, void *e);
63extern void cupsArrayClear(cups_array_t *a);
64extern int cupsArrayCount(cups_array_t *a);
65extern void *cupsArrayCurrent(cups_array_t *a);
66extern void cupsArrayDelete(cups_array_t *a);
67extern cups_array_t *cupsArrayDup(cups_array_t *a);
68extern void *cupsArrayFind(cups_array_t *a, void *e);
69extern void *cupsArrayFirst(cups_array_t *a);
f7deaa1a 70extern int cupsArrayGetIndex(cups_array_t *a);
71extern int cupsArrayGetInsert(cups_array_t *a);
ef416fc2 72extern void *cupsArrayIndex(cups_array_t *a, int n);
fa73b229 73extern int cupsArrayInsert(cups_array_t *a, void *e);
ef416fc2 74extern void *cupsArrayLast(cups_array_t *a);
75extern cups_array_t *cupsArrayNew(cups_array_func_t f, void *d);
b94498cf 76extern cups_array_t *cupsArrayNew2(cups_array_func_t f, void *d,
77 cups_ahash_func_t h, int hsize);
ef416fc2 78extern void *cupsArrayNext(cups_array_t *a);
79extern void *cupsArrayPrev(cups_array_t *a);
80extern int cupsArrayRemove(cups_array_t *a, void *e);
81extern void *cupsArrayRestore(cups_array_t *a);
82extern int cupsArraySave(cups_array_t *a);
e1d6a774 83extern void *cupsArrayUserData(cups_array_t *a);
ef416fc2 84
85# ifdef __cplusplus
86}
87# endif /* __cplusplus */
88#endif /* !_CUPS_ARRAY_H_ */
89
90/*
b94498cf 91 * End of "$Id: array.h 6477 2007-04-25 19:55:45Z mike $".
ef416fc2 92 */