Sander Schobers
3c89748eac
- Drop addon is based on WM_DROPFILES, dragdrop addon is based on the OLE IDragDrop interface and thus can registerer more interactions. - The allg5ui implementation will try to fall back on the drop addon (because the dragdrop addon wouldn't work properly). - Drop addon is refactored to use the same interface as the dragdrop addon.
27 lines
810 B
C
27 lines
810 B
C
#ifndef __VECTOR_H__
|
|
#define __VECTOR_H__
|
|
|
|
#define vector(type) \
|
|
struct \
|
|
{ \
|
|
type *items; \
|
|
size_t count; \
|
|
}
|
|
|
|
#define vector_init(v) \
|
|
do \
|
|
{ \
|
|
(v).items = 0; \
|
|
(v).count = 0; \
|
|
} while (0);
|
|
|
|
#define vector_append(type, v, i) \
|
|
do \
|
|
{ \
|
|
(v).count++; \
|
|
(v).items = (type *)realloc((v).items, sizeof(type) * (v).count); \
|
|
(v).items[(v).count - 1] = i; \
|
|
} while (0);
|
|
|
|
#endif // __VECTOR_H__
|