Merge pull request #3587 from techee/unused_remove
[geany-mirror.git] / ctags / main / numarray.h
blobb50e9d8d4d504343c98d7410c5a3d265cb5b9246
1 /*
2 * Copyright (c) 1999-2002, Darren Hiebert
4 * This source code is released for free distribution under the terms of the
5 * GNU General Public License version 2 or (at your option) any later version.
7 * Defines external interface to resizable pointer arrays.
8 */
9 #ifndef CTAGS_MAIN_NUMARRAY_H
10 #define CTAGS_MAIN_NUMARRAY_H
13 * INCLUDE FILES
15 #include "general.h" /* must always come first */
18 #define declNumArray(prefix,Prefix,type) \
20 struct s##Prefix##Array; \
21 typedef struct s##Prefix##Array prefix##Array; \
23 extern prefix##Array *prefix##ArrayNew (void); \
24 extern unsigned int prefix##ArrayAdd (prefix##Array *const current, type num); \
25 extern void prefix##ArrayRemoveLast (prefix##Array *const current); \
26 extern void prefix##ArrayCombine (prefix##Array *const current, prefix##Array *const from); \
27 extern void prefix##ArrayClear (prefix##Array *const current); \
28 extern unsigned int prefix##ArrayCount (const prefix##Array *const current); \
29 extern type prefix##ArrayItem (const prefix##Array *const current, const unsigned int indx); \
30 extern type prefix##ArrayLast (const prefix##Array *const current); \
31 extern void prefix##ArrayDelete (prefix##Array *const current); \
32 extern bool prefix##ArrayHasTest (const prefix##Array *const current, \
33 bool (*test)(const type num, void *userData), \
34 void *userData); \
35 extern bool prefix##ArrayHas (const prefix##Array *const current, type num); \
36 extern void prefix##ArrayReverse (const prefix##Array *const current); \
37 extern void prefix##ArrayDeleteItem (prefix##Array* const current, unsigned int indx); \
39 extern void prefix##ArraySort (prefix##Array *const current, bool descendingOrder);
41 declNumArray(char, Char, char)
42 declNumArray(uchar, Uchar, unsigned char)
43 declNumArray(int, Int, int)
44 declNumArray(uint, Uint, unsigned int)
45 declNumArray(long, Long, long)
46 declNumArray(ulong, Ulong, unsigned long)
48 #endif /* CTAGS_MAIN_NUMARRAY_H */