diff options
author | treectrl <treectrl> | 2004-08-09 02:25:35 (GMT) |
---|---|---|
committer | treectrl <treectrl> | 2004-08-09 02:25:35 (GMT) |
commit | bcfb76d3dc2831821ea8ac0e38237eefc0b8b812 (patch) | |
tree | a8e27de27fcaf91fe58bff112d5f3137441950ad /generic/tkTreeStyle.c | |
parent | 4c6c128148faf654daaacfe4a0e0f904b7a958cd (diff) | |
download | tktreectrl-bcfb76d3dc2831821ea8ac0e38237eefc0b8b812.zip tktreectrl-bcfb76d3dc2831821ea8ac0e38237eefc0b8b812.tar.gz tktreectrl-bcfb76d3dc2831821ea8ac0e38237eefc0b8b812.tar.bz2 |
Moved elementTypeList to tkTreeElem.c where it is initialized.
Diffstat (limited to 'generic/tkTreeStyle.c')
-rw-r--r-- | generic/tkTreeStyle.c | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/generic/tkTreeStyle.c b/generic/tkTreeStyle.c index a0efa37..0e4abfe 100644 --- a/generic/tkTreeStyle.c +++ b/generic/tkTreeStyle.c @@ -5,21 +5,12 @@ * * Copyright (c) 2002-2004 Tim Baker * - * RCS: @(#) $Id: tkTreeStyle.c,v 1.14 2004/07/30 21:13:53 treectrl Exp $ + * RCS: @(#) $Id: tkTreeStyle.c,v 1.15 2004/08/09 02:25:35 treectrl Exp $ */ #include "tkTreeCtrl.h" #include "tkTreeElem.h" -#define STATIC_SIZE 20 -#define STATIC_ALLOC(P,T,C) \ - if (C > STATIC_SIZE) \ - P = (T *) ckalloc(sizeof(T) * (C)) -#define STATIC_FREE(P,T,C) \ - memset((char *) P, 0xAA, sizeof(T) * (C)); \ - if (C > STATIC_SIZE) \ - ckfree((char *) P) - typedef struct Style Style; typedef struct ElementLink ElementLink; @@ -79,8 +70,6 @@ struct ElementLink int *onion, onionCount; /* -union option info */ }; -static ElementType *elementTypeList = NULL; - static char *orientStringTable[] = { "horizontal", "vertical", (char *) NULL }; static Tk_OptionSpec styleOptionSpecs[] = { @@ -3949,23 +3938,6 @@ int TreeStyle_NumElements(TreeCtrl *tree, TreeStyle style_) int TreeStyle_Init(Tcl_Interp *interp) { - ElementType *typePtr; - - elementTypeList = &elemTypeBitmap; - elemTypeBitmap.next = &elemTypeBorder; - elemTypeBorder.next = &elemTypeImage; - elemTypeImage.next = &elemTypeRect; - elemTypeRect.next = &elemTypeText; - elemTypeText.next = NULL; - - for (typePtr = elementTypeList; - typePtr != NULL; - typePtr = typePtr->next) - { - typePtr->optionTable = Tk_CreateOptionTable(interp, - typePtr->optionSpecs); - } - return TCL_OK; } |