/* @(#)vector_extern.h 1.4 95/09/16 */

/*
 * Copyright (c) 1994, 1995 by Wayne C. Gramlich.  All rights reserved.
 *
 * Permission to use, copy, modify, distribute, and sell this software
 * for any purpose is hereby granted without fee provided that the above
 * copyright notice and this permission are retained.  The author makes
 * no representations about the suitability of this software for any purpose.
 * It is provided "as is" without express or implied warranty.
 */

#if !defined(VECTOR_EXTERN_H)
#define VECTOR_EXTERN_H

#include "memory_typedef.h"
#include "vector_typedef.h"

/* This macro is used for other loop iteration macros: */
#define VECTOR_LOOP(Type, variable, vector)			\
    for (variable = (Type)vector_loop_init((Vector)vector);	\
	 variable != (Type)0;					\
	 variable = (Type)vector_loop_next((Vector)vector))

extern void vector_append(Vector, Pointer);
extern void vector_clear(Vector);
extern Vector vector_create();
extern void vector_delete(Vector, unsigned);
extern int vector_is_empty();
extern Pointer vector_fetch(Vector, unsigned);
extern Pointer vector_loop_init(Vector);
extern Pointer vector_loop_next(Vector);
extern unsigned vector_size(Vector);
extern void vector_sort(Vector, Vector_compare_element, void *);
extern void vector_trim(Vector, unsigned);

#endif /* !defined(VECTOR_EXTERN_H) */

