home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / cups / array.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-10-21  |  2.4 KB  |  84 lines

  1. /*
  2.  * "$Id: array.h 6649 2007-07-11 21:46:42Z mike $"
  3.  *
  4.  *   Sorted array definitions for the Common UNIX Printing System (CUPS).
  5.  *
  6.  *   Copyright 2007 by Apple Inc.
  7.  *   Copyright 1997-2007 by Easy Software Products.
  8.  *
  9.  *   These coded instructions, statements, and computer programs are the
  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/".
  14.  *
  15.  *   This file is subject to the Apple OS-Developed Software exception.
  16.  */
  17.  
  18. #ifndef _CUPS_ARRAY_H_
  19. #  define _CUPS_ARRAY_H_
  20.  
  21. /*
  22.  * Include necessary headers...
  23.  */
  24.  
  25. #  include <stdlib.h>
  26.  
  27.  
  28. /*
  29.  * C++ magic...
  30.  */
  31.  
  32. #  ifdef __cplusplus
  33. extern "C" {
  34. #  endif /* __cplusplus */
  35.  
  36.  
  37. /*
  38.  * Types and structures...
  39.  */
  40.  
  41. typedef struct _cups_array_s cups_array_t;
  42.                     /**** CUPS array type ****/
  43. typedef int (*cups_array_func_t)(void *first, void *second, void *data);
  44.                     /**** Array comparison function ****/
  45. typedef int (*cups_ahash_func_t)(void *element, void *data);
  46.                     /**** Array hash function ****/
  47.  
  48.  
  49. /*
  50.  * Functions...
  51.  */
  52.  
  53. extern int        cupsArrayAdd(cups_array_t *a, void *e);
  54. extern void        cupsArrayClear(cups_array_t *a);
  55. extern int        cupsArrayCount(cups_array_t *a);
  56. extern void        *cupsArrayCurrent(cups_array_t *a);
  57. extern void        cupsArrayDelete(cups_array_t *a);
  58. extern cups_array_t    *cupsArrayDup(cups_array_t *a);
  59. extern void        *cupsArrayFind(cups_array_t *a, void *e);
  60. extern void        *cupsArrayFirst(cups_array_t *a);
  61. extern int        cupsArrayGetIndex(cups_array_t *a);
  62. extern int        cupsArrayGetInsert(cups_array_t *a);
  63. extern void        *cupsArrayIndex(cups_array_t *a, int n);
  64. extern int        cupsArrayInsert(cups_array_t *a, void *e);
  65. extern void        *cupsArrayLast(cups_array_t *a);
  66. extern cups_array_t    *cupsArrayNew(cups_array_func_t f, void *d);
  67. extern cups_array_t    *cupsArrayNew2(cups_array_func_t f, void *d,
  68.                            cups_ahash_func_t h, int hsize);
  69. extern void        *cupsArrayNext(cups_array_t *a);
  70. extern void        *cupsArrayPrev(cups_array_t *a);
  71. extern int        cupsArrayRemove(cups_array_t *a, void *e);
  72. extern void        *cupsArrayRestore(cups_array_t *a);
  73. extern int        cupsArraySave(cups_array_t *a);
  74. extern void        *cupsArrayUserData(cups_array_t *a);
  75.  
  76. #  ifdef __cplusplus
  77. }
  78. #  endif /* __cplusplus */
  79. #endif /* !_CUPS_ARRAY_H_ */
  80.  
  81. /*
  82.  * End of "$Id: array.h 6649 2007-07-11 21:46:42Z mike $".
  83.  */
  84.