Skip to content

Commit

Permalink
added memory debugging include file
Browse files Browse the repository at this point in the history
  • Loading branch information
bagder committed Oct 9, 2000
1 parent d49d05b commit 0f8facb
Show file tree
Hide file tree
Showing 14 changed files with 66 additions and 1 deletion.
5 changes: 5 additions & 0 deletions lib/base64.c
Expand Up @@ -38,6 +38,11 @@
#include <string.h>
#include "base64.h"

/* The last #include file should be: */
#ifdef MALLOCDEBUG
#include "memdebug.h"
#endif

static char base64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

static int pos(char c)
Expand Down
6 changes: 6 additions & 0 deletions lib/cookie.c
Expand Up @@ -65,6 +65,11 @@ Example set of cookies:
#include "getdate.h"
#include "strequal.h"

/* The last #include file should be: */
#ifdef MALLOCDEBUG
#include "memdebug.h"
#endif

/****************************************************************************
*
* cookie_add()
Expand Down Expand Up @@ -496,6 +501,7 @@ void cookie_cleanup(struct CookieInfo *c)
free(co);
co = next;
}
free(c); /* free the base struct as well */
}
}

5 changes: 5 additions & 0 deletions lib/escape.c
Expand Up @@ -48,6 +48,11 @@
#include <stdlib.h>
#include <string.h>

/* The last #include file should be: */
#ifdef MALLOCDEBUG
#include "memdebug.h"
#endif

char *curl_escape(char *string)
{
int alloc=strlen(string)+1;
Expand Down
5 changes: 5 additions & 0 deletions lib/formdata.c
Expand Up @@ -63,6 +63,11 @@

#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
in binary data is very close to zero, 64^32 makes
6277101735386680763835789423207666416102355444464034512896
Expand Down
6 changes: 5 additions & 1 deletion lib/ftp.c
Expand Up @@ -89,6 +89,10 @@
#ifdef KRB4
#include "security.h"
#endif
/* The last #include file should be: */
#ifdef MALLOCDEBUG
#include "memdebug.h"
#endif

/* returns last node in linked list */
static struct curl_slist *slist_get_last(struct curl_slist *list)
Expand Down Expand Up @@ -1178,7 +1182,7 @@ CURLcode _ftp(struct connectdata *conn)
else {
/* Set type to binary (unless specified ASCII) */
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);
if(nread < 0)
Expand Down
4 changes: 4 additions & 0 deletions lib/getenv.c
Expand Up @@ -45,6 +45,10 @@
#include <windows.h>
#endif

#ifdef MALLOCDEBUG
#include "memdebug.h"
#endif

char *GetEnv(char *variable)
{
#ifdef WIN32
Expand Down
5 changes: 5 additions & 0 deletions lib/highlevel.c
Expand Up @@ -111,6 +111,11 @@
#define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h>

/* The last #include file should be: */
#ifdef MALLOCDEBUG
#include "memdebug.h"
#endif

#ifndef min
#define min(a, b) ((a) < (b) ? (a) : (b))
#endif
Expand Down
5 changes: 5 additions & 0 deletions lib/hostip.c
Expand Up @@ -72,6 +72,11 @@
#include "inet_ntoa_r.h"
#endif

/* The last #include file should be: */
#ifdef MALLOCDEBUG
#include "memdebug.h"
#endif

/* --- resolve name or IP-number --- */

char *MakeIP(unsigned long num,char *addr, int addr_len)
Expand Down
5 changes: 5 additions & 0 deletions lib/http.c
Expand Up @@ -117,6 +117,11 @@
#define _MPRINTF_REPLACE /* use our functions only */
#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
* header (prefix).
Expand Down
5 changes: 5 additions & 0 deletions lib/krb4.c
Expand Up @@ -47,6 +47,11 @@
#include <string.h>
#include <krb.h>

/* The last #include file should be: */
#ifdef MALLOCDEBUG
#include "memdebug.h"
#endif

#ifdef FTP_SERVER
#define LOCAL_ADDR ctrl_addr
#define REMOTE_ADDR his_addr
Expand Down
4 changes: 4 additions & 0 deletions lib/mprintf.c
Expand Up @@ -98,6 +98,10 @@ static const char rcsid[] = "@(#)$Id$";
#include <ctype.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 MAX_PARAMETERS 128 /* lame static limit */
Expand Down
4 changes: 4 additions & 0 deletions lib/security.c
Expand Up @@ -47,6 +47,10 @@
#include <string.h>
#include <netdb.h>
#include "base64.h"
/* The last #include file should be: */
#ifdef MALLOCDEBUG
#include "memdebug.h"
#endif

#define min(a, b) ((a) < (b) ? (a) : (b))

Expand Down
4 changes: 4 additions & 0 deletions lib/sendf.c
Expand Up @@ -61,6 +61,10 @@
#include "security.h"
#include <string.h>
#endif
/* The last #include file should be: */
#ifdef MALLOCDEBUG
#include "memdebug.h"
#endif

/* infof() is for info message along the way */

Expand Down
4 changes: 4 additions & 0 deletions lib/url.c
Expand Up @@ -126,6 +126,10 @@
#ifdef KRB4
#include "security.h"
#endif
/* The last #include file should be: */
#ifdef MALLOCDEBUG
#include "memdebug.h"
#endif

/* -- -- */

Expand Down

0 comments on commit 0f8facb

Please sign in to comment.