]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | /* |
f7faf1f5 | 2 | * "$Id: array.h 5258 2006-03-09 15:40:56Z mike $" |
ef416fc2 | 3 | * |
4 | * Sorted array definitions for the Common UNIX Printing System (CUPS). | |
5 | * | |
6 | * Copyright 1997-2006 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 | ||
55 | /* | |
56 | * Functions... | |
57 | */ | |
58 | ||
59 | extern int cupsArrayAdd(cups_array_t *a, void *e); | |
60 | extern void cupsArrayClear(cups_array_t *a); | |
61 | extern int cupsArrayCount(cups_array_t *a); | |
62 | extern void *cupsArrayCurrent(cups_array_t *a); | |
63 | extern void cupsArrayDelete(cups_array_t *a); | |
64 | extern cups_array_t *cupsArrayDup(cups_array_t *a); | |
65 | extern void *cupsArrayFind(cups_array_t *a, void *e); | |
66 | extern void *cupsArrayFirst(cups_array_t *a); | |
67 | extern void *cupsArrayIndex(cups_array_t *a, int n); | |
fa73b229 | 68 | extern int cupsArrayInsert(cups_array_t *a, void *e); |
ef416fc2 | 69 | extern void *cupsArrayLast(cups_array_t *a); |
70 | extern cups_array_t *cupsArrayNew(cups_array_func_t f, void *d); | |
71 | extern void *cupsArrayNext(cups_array_t *a); | |
72 | extern void *cupsArrayPrev(cups_array_t *a); | |
73 | extern int cupsArrayRemove(cups_array_t *a, void *e); | |
74 | extern void *cupsArrayRestore(cups_array_t *a); | |
75 | extern int cupsArraySave(cups_array_t *a); | |
e1d6a774 | 76 | extern void *cupsArrayUserData(cups_array_t *a); |
ef416fc2 | 77 | |
78 | # ifdef __cplusplus | |
79 | } | |
80 | # endif /* __cplusplus */ | |
81 | #endif /* !_CUPS_ARRAY_H_ */ | |
82 | ||
83 | /* | |
f7faf1f5 | 84 | * End of "$Id: array.h 5258 2006-03-09 15:40:56Z mike $". |
ef416fc2 | 85 | */ |