Main Page | Class List | File List | Class Members | File Members | Related Pages

array.h

Go to the documentation of this file.
00001 /* 00002 * $Id: array.h,v 1.11 2003/10/16 18:50:54 jasta Exp $ 00003 * 00004 * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) 00005 * 00006 * This program is free software; you can redistribute it and/or modify it 00007 * under the terms of the GNU General Public License as published by the 00008 * Free Software Foundation; either version 2, or (at your option) any 00009 * later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, but 00012 * WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * General Public License for more details. 00015 */ 00016 00017 #ifndef __ARRAY_H 00018 #define __ARRAY_H 00019 00020 /*****************************************************************************/ 00021 00055 /*****************************************************************************/ 00056 00060 typedef struct 00061 { 00065 size_t size; 00066 size_t nmemb; 00067 size_t offs; 00069 void **array; 00070 } Array; 00071 00072 /*****************************************************************************/ 00073 00074 EXTERN_C_BEGIN 00075 00076 /*****************************************************************************/ 00077 00086 LIBGIFT_EXPORT 00087 Array *array_new (void *first, ...); 00088 00095 LIBGIFT_EXPORT 00096 void array_unset (Array **a); 00097 00098 /*****************************************************************************/ 00099 00105 LIBGIFT_EXPORT 00106 void *array_push (Array **a, void *element); 00107 00114 LIBGIFT_EXPORT 00115 void *array_pop (Array **a); 00116 00117 /*****************************************************************************/ 00118 00124 LIBGIFT_EXPORT 00125 void *array_shift (Array **a); 00126 00132 LIBGIFT_EXPORT 00133 void *array_unshift (Array **a, void *element); 00134 00135 /*****************************************************************************/ 00136 00145 LIBGIFT_EXPORT 00146 void *array_index (Array **a, int index); 00147 00152 LIBGIFT_EXPORT 00153 size_t array_count (Array **a); 00154 00155 /*****************************************************************************/ 00156 00172 LIBGIFT_EXPORT 00173 void *array_splice (Array **a, int offset, int length, void *first, ...); 00174 00175 /*****************************************************************************/ 00176 00200 LIBGIFT_EXPORT 00201 int array_list (Array **a, ...); 00202 00203 /*****************************************************************************/ 00204 00205 EXTERN_C_END 00206 00207 /*****************************************************************************/ 00208 00209 #endif /* __ARRAY_H */

Generated on Sun Aug 22 08:07:10 2004 by doxygen 1.3.7