diff options
-rw-r--r-- | tkhtml1/src/html.h | 3 | ||||
-rw-r--r-- | tkhtml1/src/htmlcmd.c | 8 | ||||
-rw-r--r-- | tkhtml1/src/htmlcmd.h | 3 | ||||
-rw-r--r-- | tkhtml1/src/htmldraw.h | 3 | ||||
-rw-r--r-- | tkhtml1/src/htmlform.h | 3 | ||||
-rw-r--r-- | tkhtml1/src/htmlimage.h | 3 | ||||
-rw-r--r-- | tkhtml1/src/htmllayout.h | 3 | ||||
-rw-r--r-- | tkhtml1/src/htmlparse.h | 3 | ||||
-rw-r--r-- | tkhtml1/src/htmlsizer.h | 3 | ||||
-rw-r--r-- | tkhtml1/src/htmltable.h | 3 | ||||
-rw-r--r-- | tkhtml1/src/htmlurl.h | 3 | ||||
-rw-r--r-- | tkhtml1/src/htmlwidget.h | 3 |
12 files changed, 30 insertions, 11 deletions
diff --git a/tkhtml1/src/html.h b/tkhtml1/src/html.h index b43da47..55f44cd 100644 --- a/tkhtml1/src/html.h +++ b/tkhtml1/src/html.h @@ -90,7 +90,8 @@ /* ** Macros to allocate and free memory. */ -#define HtmlAlloc(A) ((void*)Tcl_Alloc(A)) +/*#define HtmlAlloc(A) ((void*)Tcl_Alloc(A))*/ +void* HtmlAlloc(size_t); #define HtmlFree(A) Tcl_Free((char*)(A)) #define HtmlRealloc(A,B) ((void*)Tcl_Realloc((A),(B))) diff --git a/tkhtml1/src/htmlcmd.c b/tkhtml1/src/htmlcmd.c index c95d080..5f5fe73 100644 --- a/tkhtml1/src/htmlcmd.c +++ b/tkhtml1/src/htmlcmd.c @@ -685,6 +685,14 @@ int HtmlTokenListCmd( return TCL_OK; } +void* HtmlAlloc(size_t A) +{ + void* ptr = Tcl_Alloc(A); + if (ptr) + memset(ptr,0,A); + return ptr; +} + #ifdef DEBUG /* ** WIDGET debug dump START END diff --git a/tkhtml1/src/htmlcmd.h b/tkhtml1/src/htmlcmd.h index 2b7930a..9417a00 100644 --- a/tkhtml1/src/htmlcmd.h +++ b/tkhtml1/src/htmlcmd.h @@ -58,7 +58,8 @@ struct HtmlBlock { }; int HtmlTokenNumber(HtmlElement *p); int HtmlIndexCmd(HtmlWidget *htmlPtr,Tcl_Interp *interp,int argc,const char **argv); -#define HtmlAlloc(A) ((void*)Tcl_Alloc(A)) +/*#define HtmlAlloc(A) ((void*)Tcl_Alloc(A))*/ +void* HtmlAlloc(size_t); #define HtmlFree(A) Tcl_Free((char*)(A)) #define Html_Unknown 3 int HtmlNameToType(const char *zType); diff --git a/tkhtml1/src/htmldraw.h b/tkhtml1/src/htmldraw.h index 6768dd3..7976f89 100644 --- a/tkhtml1/src/htmldraw.h +++ b/tkhtml1/src/htmldraw.h @@ -457,7 +457,8 @@ struct HtmlWidget { }; #define HtmlFree(A) Tcl_Free((char*)(A)) #define Html_Block 4 -#define HtmlAlloc(A) ((void*)Tcl_Alloc(A)) +/*#define HtmlAlloc(A) ((void*)Tcl_Alloc(A))*/ +void* HtmlAlloc(size_t); struct HtmlImage { HtmlWidget *htmlPtr; /* The owner of this image */ Tk_Image image; /* The Tk image token */ diff --git a/tkhtml1/src/htmlform.h b/tkhtml1/src/htmlform.h index c6b1671..82fbd7e 100644 --- a/tkhtml1/src/htmlform.h +++ b/tkhtml1/src/htmlform.h @@ -14,7 +14,8 @@ void HtmlScheduleRedraw(HtmlWidget *htmlPtr); #define RELAYOUT 0x000010 #define STY_Invisible 0x040 #define HTML_Visible 0x01 /* This element produces "ink" */ -#define HtmlAlloc(A) ((void*)Tcl_Alloc(A)) +/*#define HtmlAlloc(A) ((void*)Tcl_Alloc(A))*/ +void* HtmlAlloc(size_t); void HtmlTPCantHappen(const char *zFile,int line); #if defined(COVERAGE_TEST) # define CANT_HAPPEN HtmlTPCantHappen(__FILE__,__LINE__) diff --git a/tkhtml1/src/htmlimage.h b/tkhtml1/src/htmlimage.h index bbb5703..e7cb81f 100644 --- a/tkhtml1/src/htmlimage.h +++ b/tkhtml1/src/htmlimage.h @@ -1,5 +1,6 @@ /* This file was automatically generated. Do not edit! */ -#define HtmlAlloc(A) ((void*)Tcl_Alloc(A)) +/*#define HtmlAlloc(A) ((void*)Tcl_Alloc(A))*/ +void* HtmlAlloc(size_t); #define HtmlFree(A) Tcl_Free((char*)(A)) typedef struct HtmlWidget HtmlWidget; int HtmlUnlock(HtmlWidget *htmlPtr); diff --git a/tkhtml1/src/htmllayout.h b/tkhtml1/src/htmllayout.h index bf4ce59..0d5805b 100644 --- a/tkhtml1/src/htmllayout.h +++ b/tkhtml1/src/htmllayout.h @@ -538,7 +538,8 @@ extern int HtmlTPArray[2000]; #if !(defined(COVERAGE_TEST)) # define TestPoint(X) #endif -#define HtmlAlloc(A) ((void*)Tcl_Alloc(A)) +/*#define HtmlAlloc(A) ((void*)Tcl_Alloc(A))*/ +void* HtmlAlloc(size_t); struct HtmlMargin { int indent; /* Size of the current margin */ int bottom; /* Y value at which this margin expires */ diff --git a/tkhtml1/src/htmlparse.h b/tkhtml1/src/htmlparse.h index a5ae83f..b5cd34d 100644 --- a/tkhtml1/src/htmlparse.h +++ b/tkhtml1/src/htmlparse.h @@ -81,7 +81,8 @@ struct HtmlSpaceElement { Html_u8 ascent; /* height above the baseline */ Html_u8 descent; /* depth below the baseline */ }; -#define HtmlAlloc(A) ((void*)Tcl_Alloc(A)) +/*#define HtmlAlloc(A) ((void*)Tcl_Alloc(A))*/ +void* HtmlAlloc(size_t); #if !defined(HAVE_STRICMP) # define strnicmp strncasecmp #endif diff --git a/tkhtml1/src/htmlsizer.h b/tkhtml1/src/htmlsizer.h index c14bcf3..c5c3081 100644 --- a/tkhtml1/src/htmlsizer.h +++ b/tkhtml1/src/htmlsizer.h @@ -391,7 +391,8 @@ void HtmlTPCantHappen(const char *zFile,int line); #define Html_TABLE 129 #define Html_TypeCount 151 HtmlStyle HtmlPopStyleStack(HtmlWidget *htmlPtr,int tag); -#define HtmlAlloc(A) ((void*)Tcl_Alloc(A)) +/*#define HtmlAlloc(A) ((void*)Tcl_Alloc(A))*/ +void* HtmlAlloc(size_t); typedef struct HtmlStyleStack HtmlStyleStack; struct HtmlStyleStack { HtmlStyleStack *pNext; /* Next style on the stack */ diff --git a/tkhtml1/src/htmltable.h b/tkhtml1/src/htmltable.h index b3f7975..2e4cb03 100644 --- a/tkhtml1/src/htmltable.h +++ b/tkhtml1/src/htmltable.h @@ -122,7 +122,8 @@ struct HtmlRef { HtmlMarkupElement markup; HtmlElement *pOther; /* Pointer to some other Html element */ }; -#define HtmlAlloc(A) ((void*)Tcl_Alloc(A)) +/*#define HtmlAlloc(A) ((void*)Tcl_Alloc(A))*/ +void* HtmlAlloc(size_t); #define Html_TH 135 #define Html_TD 131 #define Html_EndCAPTION 26 diff --git a/tkhtml1/src/htmlurl.h b/tkhtml1/src/htmlurl.h index dba8115..871c48f 100644 --- a/tkhtml1/src/htmlurl.h +++ b/tkhtml1/src/htmlurl.h @@ -242,7 +242,8 @@ extern int HtmlTPArray[2000]; #if !(defined(COVERAGE_TEST)) # define TestPoint(X) #endif -#define HtmlAlloc(A) ((void*)Tcl_Alloc(A)) +/*#define HtmlAlloc(A) ((void*)Tcl_Alloc(A))*/ +void* HtmlAlloc(size_t); typedef struct HtmlUri HtmlUri; struct HtmlUri { char *zScheme; /* Ex: "http" */ diff --git a/tkhtml1/src/htmlwidget.h b/tkhtml1/src/htmlwidget.h index 86e9da1..1c634b4 100644 --- a/tkhtml1/src/htmlwidget.h +++ b/tkhtml1/src/htmlwidget.h @@ -2,7 +2,8 @@ #define DLL_EXPORT DLL_EXPORT int Tkhtml1_Init(Tcl_Interp *interp); #define INTERFACE 0 -#define HtmlAlloc(A) ((void*)Tcl_Alloc(A)) +/*#define HtmlAlloc(A) ((void*)Tcl_Alloc(A))*/ +void* HtmlAlloc(size_t); typedef struct HtmlWidget HtmlWidget; #define DEBUG 1 #if defined(DEBUG) |