added memory debugging include file

This commit is contained in:
Daniel Stenberg 2000-10-09 11:12:34 +00:00
parent d49d05bce6
commit 0f8facb49b
14 changed files with 66 additions and 1 deletions

View File

@ -38,6 +38,11 @@
#include <string.h> #include <string.h>
#include "base64.h" #include "base64.h"
/* The last #include file should be: */
#ifdef MALLOCDEBUG
#include "memdebug.h"
#endif
static char base64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; static char base64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
static int pos(char c) static int pos(char c)

View File

@ -65,6 +65,11 @@ Example set of cookies:
#include "getdate.h" #include "getdate.h"
#include "strequal.h" #include "strequal.h"
/* The last #include file should be: */
#ifdef MALLOCDEBUG
#include "memdebug.h"
#endif
/**************************************************************************** /****************************************************************************
* *
* cookie_add() * cookie_add()
@ -496,6 +501,7 @@ void cookie_cleanup(struct CookieInfo *c)
free(co); free(co);
co = next; co = next;
} }
free(c); /* free the base struct as well */
} }
} }

View File

@ -48,6 +48,11 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
/* The last #include file should be: */
#ifdef MALLOCDEBUG
#include "memdebug.h"
#endif
char *curl_escape(char *string) char *curl_escape(char *string)
{ {
int alloc=strlen(string)+1; int alloc=strlen(string)+1;

View File

@ -63,6 +63,11 @@
#include "strequal.h" #include "strequal.h"
/* The last #include file should be: */
#ifdef MALLOCDEBUG
#include "memdebug.h"
#endif
/* Length of the random boundary string. The risk of this being used /* Length of the random boundary string. The risk of this being used
in binary data is very close to zero, 64^32 makes in binary data is very close to zero, 64^32 makes
6277101735386680763835789423207666416102355444464034512896 6277101735386680763835789423207666416102355444464034512896

View File

@ -89,6 +89,10 @@
#ifdef KRB4 #ifdef KRB4
#include "security.h" #include "security.h"
#endif #endif
/* The last #include file should be: */
#ifdef MALLOCDEBUG
#include "memdebug.h"
#endif
/* returns last node in linked list */ /* returns last node in linked list */
static struct curl_slist *slist_get_last(struct curl_slist *list) static struct curl_slist *slist_get_last(struct curl_slist *list)
@ -1178,7 +1182,7 @@ CURLcode _ftp(struct connectdata *conn)
else { else {
/* Set type to binary (unless specified ASCII) */ /* Set type to binary (unless specified ASCII) */
ftpsendf(data->firstsocket, conn, "TYPE %s", ftpsendf(data->firstsocket, conn, "TYPE %s",
(data->bits.ftp_list_only)?"A":"I"); (data->bits.ftp_ascii)?"A":"I");
nread = GetLastResponse(data->firstsocket, buf, conn); nread = GetLastResponse(data->firstsocket, buf, conn);
if(nread < 0) if(nread < 0)

View File

@ -45,6 +45,10 @@
#include <windows.h> #include <windows.h>
#endif #endif
#ifdef MALLOCDEBUG
#include "memdebug.h"
#endif
char *GetEnv(char *variable) char *GetEnv(char *variable)
{ {
#ifdef WIN32 #ifdef WIN32

View File

@ -111,6 +111,11 @@
#define _MPRINTF_REPLACE /* use our functions only */ #define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h> #include <curl/mprintf.h>
/* The last #include file should be: */
#ifdef MALLOCDEBUG
#include "memdebug.h"
#endif
#ifndef min #ifndef min
#define min(a, b) ((a) < (b) ? (a) : (b)) #define min(a, b) ((a) < (b) ? (a) : (b))
#endif #endif

View File

@ -72,6 +72,11 @@
#include "inet_ntoa_r.h" #include "inet_ntoa_r.h"
#endif #endif
/* The last #include file should be: */
#ifdef MALLOCDEBUG
#include "memdebug.h"
#endif
/* --- resolve name or IP-number --- */ /* --- resolve name or IP-number --- */
char *MakeIP(unsigned long num,char *addr, int addr_len) char *MakeIP(unsigned long num,char *addr, int addr_len)

View File

@ -117,6 +117,11 @@
#define _MPRINTF_REPLACE /* use our functions only */ #define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h> #include <curl/mprintf.h>
/* The last #include file should be: */
#ifdef MALLOCDEBUG
#include "memdebug.h"
#endif
/* /*
* This function checks the linked list of custom HTTP headers for a particular * This function checks the linked list of custom HTTP headers for a particular
* header (prefix). * header (prefix).

View File

@ -47,6 +47,11 @@
#include <string.h> #include <string.h>
#include <krb.h> #include <krb.h>
/* The last #include file should be: */
#ifdef MALLOCDEBUG
#include "memdebug.h"
#endif
#ifdef FTP_SERVER #ifdef FTP_SERVER
#define LOCAL_ADDR ctrl_addr #define LOCAL_ADDR ctrl_addr
#define REMOTE_ADDR his_addr #define REMOTE_ADDR his_addr

View File

@ -98,6 +98,10 @@ static const char rcsid[] = "@(#)$Id$";
#include <ctype.h> #include <ctype.h>
#include <string.h> #include <string.h>
/* The last #include file should be: */
#ifdef MALLOCDEBUG
#include "memdebug.h"
#endif
#define BUFFSIZE 256 /* buffer for long-to-str and float-to-str calcs */ #define BUFFSIZE 256 /* buffer for long-to-str and float-to-str calcs */
#define MAX_PARAMETERS 128 /* lame static limit */ #define MAX_PARAMETERS 128 /* lame static limit */

View File

@ -47,6 +47,10 @@
#include <string.h> #include <string.h>
#include <netdb.h> #include <netdb.h>
#include "base64.h" #include "base64.h"
/* The last #include file should be: */
#ifdef MALLOCDEBUG
#include "memdebug.h"
#endif
#define min(a, b) ((a) < (b) ? (a) : (b)) #define min(a, b) ((a) < (b) ? (a) : (b))

View File

@ -61,6 +61,10 @@
#include "security.h" #include "security.h"
#include <string.h> #include <string.h>
#endif #endif
/* The last #include file should be: */
#ifdef MALLOCDEBUG
#include "memdebug.h"
#endif
/* infof() is for info message along the way */ /* infof() is for info message along the way */

View File

@ -126,6 +126,10 @@
#ifdef KRB4 #ifdef KRB4
#include "security.h" #include "security.h"
#endif #endif
/* The last #include file should be: */
#ifdef MALLOCDEBUG
#include "memdebug.h"
#endif
/* -- -- */ /* -- -- */