diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2017-08-14 17:55:46 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2017-08-14 17:55:46 (GMT) |
commit | 3b9bbdddab04c52402d14526ed2df68b84ca82e0 (patch) | |
tree | 08f2191aa2aad89844787a7c49848d304602d63a | |
parent | 0b2b14c5044e59a63469ab939f081299dbe4ec84 (diff) | |
download | blt-3b9bbdddab04c52402d14526ed2df68b84ca82e0.zip blt-3b9bbdddab04c52402d14526ed2df68b84ca82e0.tar.gz blt-3b9bbdddab04c52402d14526ed2df68b84ca82e0.tar.bz2 |
Squashed 'tkhtml1/' changes from 62e942e3..0173e38f
0173e38f fix clean xxConfig.sh issue
13d006df zero out all allocs
git-subtree-dir: tkhtml1
git-subtree-split: 0173e38f47b50e3f8831f444ac571c547cdc6870
-rwxr-xr-x | configure | 1 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | src/html.h | 3 | ||||
-rw-r--r-- | src/htmlcmd.c | 8 | ||||
-rw-r--r-- | src/htmlcmd.h | 3 | ||||
-rw-r--r-- | src/htmldraw.h | 3 | ||||
-rw-r--r-- | src/htmlform.h | 3 | ||||
-rw-r--r-- | src/htmlimage.h | 3 | ||||
-rw-r--r-- | src/htmllayout.h | 3 | ||||
-rw-r--r-- | src/htmlparse.h | 3 | ||||
-rw-r--r-- | src/htmlsizer.h | 3 | ||||
-rw-r--r-- | src/htmltable.h | 3 | ||||
-rw-r--r-- | src/htmlurl.h | 3 | ||||
-rw-r--r-- | src/htmlwidget.h | 3 |
14 files changed, 30 insertions, 13 deletions
@@ -5775,7 +5775,6 @@ src/htmltokens.c #-------------------------------------------------------------------- #CLEANFILES="$CLEANFILES pkgIndex.tcl" -CLEANFILES="$CLEANFILES tkhtml1Config.sh" if test "${TEA_PLATFORM}" = "windows" ; then # Ensure no empty if clauses : diff --git a/configure.ac b/configure.ac index 82d1623..ca8f0be 100644 --- a/configure.ac +++ b/configure.ac @@ -107,7 +107,6 @@ TEA_ADD_TCL_SOURCES([]) #-------------------------------------------------------------------- #CLEANFILES="$CLEANFILES pkgIndex.tcl" -CLEANFILES="$CLEANFILES tkhtml1Config.sh" if test "${TEA_PLATFORM}" = "windows" ; then # Ensure no empty if clauses : @@ -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/src/htmlcmd.c b/src/htmlcmd.c index c95d080..5f5fe73 100644 --- a/src/htmlcmd.c +++ b/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/src/htmlcmd.h b/src/htmlcmd.h index 2b7930a..9417a00 100644 --- a/src/htmlcmd.h +++ b/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/src/htmldraw.h b/src/htmldraw.h index 6768dd3..7976f89 100644 --- a/src/htmldraw.h +++ b/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/src/htmlform.h b/src/htmlform.h index c6b1671..82fbd7e 100644 --- a/src/htmlform.h +++ b/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/src/htmlimage.h b/src/htmlimage.h index bbb5703..e7cb81f 100644 --- a/src/htmlimage.h +++ b/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/src/htmllayout.h b/src/htmllayout.h index bf4ce59..0d5805b 100644 --- a/src/htmllayout.h +++ b/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/src/htmlparse.h b/src/htmlparse.h index a5ae83f..b5cd34d 100644 --- a/src/htmlparse.h +++ b/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/src/htmlsizer.h b/src/htmlsizer.h index c14bcf3..c5c3081 100644 --- a/src/htmlsizer.h +++ b/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/src/htmltable.h b/src/htmltable.h index b3f7975..2e4cb03 100644 --- a/src/htmltable.h +++ b/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/src/htmlurl.h b/src/htmlurl.h index dba8115..871c48f 100644 --- a/src/htmlurl.h +++ b/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/src/htmlwidget.h b/src/htmlwidget.h index 86e9da1..1c634b4 100644 --- a/src/htmlwidget.h +++ b/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) |