src/gen-chunk.c
void chunk_list_add(struct chunk *c)
{
	int newsize = (chunk_list_max + CHUNK_LIST_INCR) *	sizeof(struct chunk *);

	/* Lengthen the list if necessary */
	if (chunk_list_max == 0)
		chunk_list = mem_zalloc(newsize);
	else if ((chunk_list_max % CHUNK_LIST_INCR) == 0)
		chunk_list = (struct chunk **) mem_realloc(chunk_list, newsize);

	/* Add the new one */
	chunk_list[chunk_list_max++] = c;
}
/**
 * Add an entry to the chunk list - any problems with the length of this will
 * be more in the memory used by the chunks themselves rather than the list
 * \param c the chunk being added to the list
 */
Add an entry to the chunk list - any problems with the length of this will
be more in the memory used by the chunks themselves rather than the list
\param c the chunk being added to the list
Add an entry to the chunk list - any problems with the length of this will be more in the memory used by the chunks themselves rather than the list \ param c the chunk being added to the list
void chunk_list_add(struct chunk *c)
{
	int newsize = (chunk_list_max + CHUNK_LIST_INCR) *	sizeof(struct chunk *);
	if (chunk_list_max == 0)
		chunk_list = mem_zalloc(newsize);
	else if ((chunk_list_max % CHUNK_LIST_INCR) == 0)
		chunk_list = (struct chunk **) mem_realloc(chunk_list, newsize);
	chunk_list[chunk_list_max++] = c;
}
void chunk_list_add ( struct chunk * c ) { int newsize = ( chunk_list_max + CHUNK_LIST_INCR ) * sizeof ( struct chunk * ) ; if ( chunk_list_max == 0 ) chunk_list = mem_zalloc ( newsize ) ; else if ( ( chunk_list_max % CHUNK_LIST_INCR ) == 0 ) chunk_list = ( struct chunk * * ) mem_realloc ( chunk_list , newsize ) ; chunk_list [ chunk_list_max ++ ] = c ; }
Add an entry to the chunk list - any problems with the length of this will
 be more in the memory used by the chunks themselves rather than the list
 \param c the chunk being added to the list
Add an entry to the chunk list - any problems with the length of this will be more in the memory used by the chunks themselves rather than the list \ param c the chunk being added to the list
/* Lengthen the list if necessary */ /* Add the new one */