Cleaning up include statements adding crtdbg.h

This commit is contained in:
Michael Tryby
2019-04-03 15:55:23 -04:00
parent be2b0a3ac8
commit 84bf6f98d0
22 changed files with 706 additions and 619 deletions

View File

@@ -11,11 +11,13 @@
******************************************************************************
*/
#ifndef __APPLE__
#include <malloc.h>
#else
#include <stdlib.h>
#endif
#ifdef _DEBUG
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#else
#include <stdlib.h>
#endif
#include <string.h>
#include "hash.h"
@@ -84,7 +86,7 @@ int hashtable_update(HashTable *ht, char *key, int new_data)
{
unsigned int i = gethash(key);
DataEntry *entry;
if ( i >= HASHTABLEMAXSIZE ) return NOTFOUND;
entry = ht[i];
while (entry != NULL)
@@ -104,7 +106,7 @@ int hashtable_delete(HashTable *ht, char *key)
{
unsigned int i = gethash(key);
DataEntry *entry, *preventry;
if ( i >= HASHTABLEMAXSIZE ) return NOTFOUND;
preventry = NULL;
@@ -164,7 +166,7 @@ void hashtable_free(HashTable *ht)
{
DataEntry *entry, *nextentry;
int i;
for (i = 0; i < HASHTABLEMAXSIZE; i++)
{
entry = ht[i];