Revision: 14683 Author: adrian.chadd Date: Thu May 20 03:10:52 2010 Log: Begin fleshing out headerdoc compatible comments describing the Vector data type.
http://code.google.com/p/lusca-cache/source/detail?r=14683 Modified: /branches/LUSCA_HEAD/lib/Vector.c ======================================= --- /branches/LUSCA_HEAD/lib/Vector.c Sun May 16 03:31:39 2010 +++ /branches/LUSCA_HEAD/lib/Vector.c Thu May 20 03:10:52 2010 @@ -1,3 +1,11 @@ +/*! + * @header Vector - vector data structure + * + * This is an implementation of a Vector style memory array of fixed-size, + * arbitrary count structures. + * + * @copyright Adrian Chadd <[email protected]> + */ #include "../include/config.h" #include <stdio.h> @@ -25,9 +33,16 @@ return 1; } -/* - * Setup a vector. We don't ever fail here - if allocation fails - * then "get" will return NULL. +/*! + * @function + * vector_init + * @abstract + * Setup a vector for use. + * @discussion + * + * @param v pointer to allocated vector_t to initialise + * @param obj_size size of each struct being stored + * @param obj_count number of objects to initially allocate for */ void vector_init(vector_t *v, int obj_size, int obj_count) @@ -39,6 +54,15 @@ (void) vector_grow(v, obj_count); } +/*! + * @function + * vector_done + * @abstract + * Free memory associated with a vector_t + * @discussion + * + * @param v pointer to vector_t to clean up + */ void vector_done(vector_t *v) { @@ -48,7 +72,6 @@ xfree(v->data); v->data = NULL; } - void * vector_get_real(const vector_t *v, int offset) -- You received this message because you are subscribed to the Google Groups "lusca-commit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/lusca-commit?hl=en.
