Legofit
infers population history from nucleotide site patterns.
|
#include "ptrvec.h"
#include "misc.h"
#include <stdio.h>
#include <stdlib.h>
Functions | |
PtrVec * | PtrVec_new (unsigned n) |
Allocate an array with room for n pointers. | |
void | PtrVec_free (PtrVec *self) |
int | PtrVec_push (PtrVec *self, void *val) |
void * | PtrVec_pop (PtrVec *self) |
int | PtrVec_resize (PtrVec *self, unsigned size) |
Enlarge size of allocated buffer if necessary. More... | |
int PtrVec_resize | ( | PtrVec * | self, |
unsigned | size | ||
) |
Enlarge size of allocated buffer if necessary.
Does a fresh malloc if used==0. Otherwise, calls realloc. Returns 0 on success, ENOMEM if allocation fails.