1 /* TUI data manipulation routines.
3 Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
6 Contributed by Hewlett-Packard Company.
8 This file is part of GDB.
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place - Suite 330,
23 Boston, MA 02111-1307, USA. */
25 /* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
26 "defs.h" should be included first. Unfortunatly some systems
27 (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
28 and they clash with "bfd.h"'s definiton of true/false. The correct
29 fix is to remove true/false from "bfd.h", however, until that
30 happens, hack around it by including "config.h" and <curses.h>
46 #include "tuiGeneralWin.h"
48 /****************************
49 ** GLOBAL DECLARATIONS
50 ****************************/
51 TuiWinInfoPtr winList
[MAX_MAJOR_WINDOWS
];
53 /***************************
55 ****************************/
56 static TuiLayoutType _currentLayout
= UNDEFINED_LAYOUT
;
57 static int _termHeight
, _termWidth
;
58 static TuiGenWinInfo _locator
;
59 static TuiGenWinInfo _execInfo
[2];
60 static TuiWinInfoPtr _srcWinList
[2];
61 static TuiList _sourceWindows
=
62 {(OpaqueList
) _srcWinList
, 0};
63 static int _defaultTabLen
= DEFAULT_TAB_LEN
;
64 static TuiWinInfoPtr _winWithFocus
= (TuiWinInfoPtr
) NULL
;
65 static TuiLayoutDef _layoutDef
=
66 {SRC_WIN
, /* displayMode */
68 TUI_UNDEFINED_REGS
, /* regsDisplayType */
69 TUI_SFLOAT_REGS
}; /* floatRegsDisplayType */
70 static int _winResized
= FALSE
;
73 /*********************************
74 ** Static function forward decls
75 **********************************/
76 static void freeContent (TuiWinContent
, int, TuiWinType
);
77 static void freeContentElements (TuiWinContent
, int, TuiWinType
);
81 /*********************************
83 **********************************/
85 /******************************************
86 ** ACCESSORS & MUTATORS FOR PRIVATE DATA
87 ******************************************/
91 ** Answer a whether the terminal window has been resized or not
101 ** tuiSetWinResized().
102 ** Set a whether the terminal window has been resized or not
105 tuiSetWinResizedTo (int resized
)
107 _winResized
= resized
;
110 } /* tuiSetWinResizedTo */
115 ** Answer a pointer to the current layout definition
125 ** tuiWinWithFocus().
126 ** Answer the window with the logical focus
129 tuiWinWithFocus (void)
131 return _winWithFocus
;
132 } /* tuiWinWithFocus */
136 ** tuiSetWinWithFocus().
137 ** Set the window that has the logical focus
140 tuiSetWinWithFocus (TuiWinInfoPtr winInfo
)
142 _winWithFocus
= winInfo
;
145 } /* tuiSetWinWithFocus */
149 ** tuiDefaultTabLen().
150 ** Answer the length in chars, of tabs
153 tuiDefaultTabLen (void)
155 return _defaultTabLen
;
156 } /* tuiDefaultTabLen */
160 ** tuiSetDefaultTabLen().
161 ** Set the length in chars, of tabs
164 tuiSetDefaultTabLen (int len
)
166 _defaultTabLen
= len
;
169 } /* tuiSetDefaultTabLen */
173 ** currentSourceWin()
174 ** Accessor for the current source window. Usually there is only
175 ** one source window (either source or disassembly), but both can
176 ** be displayed at the same time.
181 return &_sourceWindows
;
182 } /* currentSourceWindows */
186 ** clearSourceWindows()
187 ** Clear the list of source windows. Usually there is only one
188 ** source window (either source or disassembly), but both can be
189 ** displayed at the same time.
192 clearSourceWindows (void)
194 _sourceWindows
.list
[0] = (Opaque
) NULL
;
195 _sourceWindows
.list
[1] = (Opaque
) NULL
;
196 _sourceWindows
.count
= 0;
199 } /* currentSourceWindows */
203 ** clearSourceWindowsDetail()
204 ** Clear the pertinant detail in the source windows.
207 clearSourceWindowsDetail (void)
211 for (i
= 0; i
< (sourceWindows ())->count
; i
++)
212 clearWinDetail ((TuiWinInfoPtr
) (sourceWindows ())->list
[i
]);
215 } /* currentSourceWindows */
219 ** addSourceWindowToList().
220 ** Add a window to the list of source windows. Usually there is
221 ** only one source window (either source or disassembly), but
222 ** both can be displayed at the same time.
225 addToSourceWindows (TuiWinInfoPtr winInfo
)
227 if (_sourceWindows
.count
< 2)
228 _sourceWindows
.list
[_sourceWindows
.count
++] = (Opaque
) winInfo
;
231 } /* addToSourceWindows */
236 ** Clear the pertinant detail in the windows.
239 clearWinDetail (TuiWinInfoPtr winInfo
)
241 if (m_winPtrNotNull (winInfo
))
243 switch (winInfo
->generic
.type
)
247 winInfo
->detail
.sourceInfo
.startLineOrAddr
.addr
= 0;
248 winInfo
->detail
.sourceInfo
.horizontalOffset
= 0;
251 winInfo
->detail
.commandInfo
.curLine
=
252 winInfo
->detail
.commandInfo
.curch
= 0;
255 winInfo
->detail
.dataDisplayInfo
.dataContent
=
256 (TuiWinContent
) NULL
;
257 winInfo
->detail
.dataDisplayInfo
.dataContentCount
= 0;
258 winInfo
->detail
.dataDisplayInfo
.regsContent
=
259 (TuiWinContent
) NULL
;
260 winInfo
->detail
.dataDisplayInfo
.regsContentCount
= 0;
261 winInfo
->detail
.dataDisplayInfo
.regsDisplayType
=
263 winInfo
->detail
.dataDisplayInfo
.regsColumnCount
= 1;
264 winInfo
->detail
.dataDisplayInfo
.displayRegs
= FALSE
;
272 } /* clearWinDetail */
276 ** sourceExecInfoPtr().
277 ** Accessor for the source execution info ptr.
280 sourceExecInfoWinPtr (void)
282 return &_execInfo
[0];
283 } /* sourceExecInfoWinPtr */
287 ** disassemExecInfoPtr().
288 ** Accessor for the disassem execution info ptr.
291 disassemExecInfoWinPtr (void)
293 return &_execInfo
[1];
294 } /* disassemExecInfoWinPtr */
298 ** locatorWinInfoPtr().
299 ** Accessor for the locator win info. Answers a pointer to the
300 ** static locator win info struct.
303 locatorWinInfoPtr (void)
306 } /* locatorWinInfoPtr */
311 ** Accessor for the termHeight
321 ** setTermHeightTo().
322 ** Mutator for the term height
325 setTermHeightTo (int h
)
330 } /* setTermHeightTo */
335 ** Accessor for the termWidth
346 ** Mutator for the termWidth
349 setTermWidthTo (int w
)
354 } /* setTermWidthTo */
359 ** Accessor for the current layout
364 return _currentLayout
;
365 } /* currentLayout */
369 ** setCurrentLayoutTo().
370 ** Mutator for the current layout
373 setCurrentLayoutTo (TuiLayoutType newLayout
)
375 _currentLayout
= newLayout
;
378 } /* setCurrentLayoutTo */
382 ** setGenWinOrigin().
383 ** Set the origin of the window
386 setGenWinOrigin (TuiGenWinInfoPtr winInfo
, int x
, int y
)
388 winInfo
->origin
.x
= x
;
389 winInfo
->origin
.y
= y
;
392 } /* setGenWinOrigin */
395 /*****************************
396 ** OTHER PUBLIC FUNCTIONS
397 *****************************/
402 ** Answer the next window in the list, cycling back to the top
406 tuiNextWin (TuiWinInfoPtr curWin
)
408 TuiWinType type
= curWin
->generic
.type
;
409 TuiWinInfoPtr nextWin
= (TuiWinInfoPtr
) NULL
;
411 if (curWin
->generic
.type
== CMD_WIN
)
414 type
= curWin
->generic
.type
+ 1;
415 while (type
!= curWin
->generic
.type
&& m_winPtrIsNull (nextWin
))
417 if (winList
[type
] && winList
[type
]->generic
.isVisible
)
418 nextWin
= winList
[type
];
434 ** Answer the prev window in the list, cycling back to the bottom
438 tuiPrevWin (TuiWinInfoPtr curWin
)
440 TuiWinType type
= curWin
->generic
.type
;
441 TuiWinInfoPtr prev
= (TuiWinInfoPtr
) NULL
;
443 if (curWin
->generic
.type
== SRC_WIN
)
446 type
= curWin
->generic
.type
- 1;
447 while (type
!= curWin
->generic
.type
&& m_winPtrIsNull (prev
))
449 if (winList
[type
]->generic
.isVisible
)
450 prev
= winList
[type
];
465 ** partialWinByName().
466 ** Answer the window represented by name
469 partialWinByName (char *name
)
471 TuiWinInfoPtr winInfo
= (TuiWinInfoPtr
) NULL
;
473 if (name
!= (char *) NULL
)
477 while (i
< MAX_MAJOR_WINDOWS
&& m_winPtrIsNull (winInfo
))
481 char *curName
= winName (&winList
[i
]->generic
);
482 if (strlen (name
) <= strlen (curName
) &&
483 strncmp (name
, curName
, strlen (name
)) == 0)
484 winInfo
= winList
[i
];
491 } /* partialWinByName */
496 ** Answer the name of the window
499 winName (TuiGenWinInfoPtr winInfo
)
501 char *name
= (char *) NULL
;
503 switch (winInfo
->type
)
512 name
= DISASSEM_NAME
;
527 ** initializeStaticData
530 initializeStaticData (void)
532 initGenericPart (sourceExecInfoWinPtr ());
533 initGenericPart (disassemExecInfoWinPtr ());
534 initGenericPart (locatorWinInfoPtr ());
537 } /* initializeStaticData */
541 ** allocGenericWinInfo().
544 allocGenericWinInfo (void)
546 TuiGenWinInfoPtr win
;
548 if ((win
= (TuiGenWinInfoPtr
) xmalloc (
549 sizeof (TuiGenWinInfoPtr
))) != (TuiGenWinInfoPtr
) NULL
)
550 initGenericPart (win
);
553 } /* allocGenericWinInfo */
557 ** initGenericPart().
560 initGenericPart (TuiGenWinInfoPtr win
)
566 win
->viewportHeight
=
568 win
->lastVisibleLine
= 0;
569 win
->handle
= (WINDOW
*) NULL
;
570 win
->content
= (OpaquePtr
) NULL
;
572 win
->isVisible
= FALSE
;
578 ** initContentElement().
581 initContentElement (TuiWinElementPtr element
, TuiWinType type
)
583 element
->highlight
= FALSE
;
588 element
->whichElement
.source
.line
= (char *) NULL
;
589 element
->whichElement
.source
.lineOrAddr
.lineNo
= 0;
590 element
->whichElement
.source
.isExecPoint
= FALSE
;
591 element
->whichElement
.source
.hasBreak
= FALSE
;
594 initGenericPart (&element
->whichElement
.dataWindow
);
595 element
->whichElement
.dataWindow
.type
= DATA_ITEM_WIN
;
596 ((TuiGenWinInfoPtr
) & element
->whichElement
.dataWindow
)->content
=
597 (OpaquePtr
) allocContent (1, DATA_ITEM_WIN
);
599 & element
->whichElement
.dataWindow
)->contentSize
= 1;
602 element
->whichElement
.command
.line
= (char *) NULL
;
605 element
->whichElement
.data
.name
= (char *) NULL
;
606 element
->whichElement
.data
.type
= TUI_REGISTER
;
607 element
->whichElement
.data
.itemNo
= UNDEFINED_ITEM
;
608 element
->whichElement
.data
.value
= (Opaque
) NULL
;
609 element
->whichElement
.data
.highlight
= FALSE
;
612 element
->whichElement
.locator
.fileName
[0] =
613 element
->whichElement
.locator
.procName
[0] = (char) 0;
614 element
->whichElement
.locator
.lineNo
= 0;
615 element
->whichElement
.locator
.addr
= 0;
618 memset(element
->whichElement
.simpleString
, ' ',
619 sizeof(element
->whichElement
.simpleString
));
625 } /* initContentElement */
631 initWinInfo (TuiWinInfoPtr winInfo
)
633 initGenericPart (&winInfo
->generic
);
634 winInfo
->canHighlight
=
635 winInfo
->isHighlighted
= FALSE
;
636 switch (winInfo
->generic
.type
)
640 winInfo
->detail
.sourceInfo
.executionInfo
= (TuiGenWinInfoPtr
) NULL
;
641 winInfo
->detail
.sourceInfo
.hasLocator
= FALSE
;
642 winInfo
->detail
.sourceInfo
.horizontalOffset
= 0;
643 winInfo
->detail
.sourceInfo
.startLineOrAddr
.addr
= 0;
644 winInfo
->detail
.sourceInfo
.filename
= 0;
647 winInfo
->detail
.dataDisplayInfo
.dataContent
= (TuiWinContent
) NULL
;
648 winInfo
->detail
.dataDisplayInfo
.dataContentCount
= 0;
649 winInfo
->detail
.dataDisplayInfo
.regsContent
= (TuiWinContent
) NULL
;
650 winInfo
->detail
.dataDisplayInfo
.regsContentCount
= 0;
651 winInfo
->detail
.dataDisplayInfo
.regsDisplayType
=
653 winInfo
->detail
.dataDisplayInfo
.regsColumnCount
= 1;
654 winInfo
->detail
.dataDisplayInfo
.displayRegs
= FALSE
;
657 winInfo
->detail
.commandInfo
.curLine
= 0;
658 winInfo
->detail
.commandInfo
.curch
= 0;
661 winInfo
->detail
.opaque
= (Opaque
) NULL
;
673 allocWinInfo (TuiWinType type
)
675 TuiWinInfoPtr winInfo
= (TuiWinInfoPtr
) NULL
;
677 winInfo
= (TuiWinInfoPtr
) xmalloc (sizeof (TuiWinInfo
));
678 if (m_winPtrNotNull (winInfo
))
680 winInfo
->generic
.type
= type
;
681 initWinInfo (winInfo
);
690 ** Allocates the content and elements in a block.
693 allocContent (int numElements
, TuiWinType type
)
695 TuiWinContent content
= (TuiWinContent
) NULL
;
696 char *elementBlockPtr
= (char *) NULL
;
699 if ((content
= (TuiWinContent
)
700 xmalloc (sizeof (TuiWinElementPtr
) * numElements
)) != (TuiWinContent
) NULL
)
702 ** All windows, except the data window, can allocate the elements
703 ** in a chunk. The data window cannot because items can be
704 ** added/removed from the data display by the user at any time.
706 if (type
!= DATA_WIN
)
708 if ((elementBlockPtr
= (char *)
709 xmalloc (sizeof (TuiWinElement
) * numElements
)) != (char *) NULL
)
711 for (i
= 0; i
< numElements
; i
++)
713 content
[i
] = (TuiWinElementPtr
) elementBlockPtr
;
714 initContentElement (content
[i
], type
);
715 elementBlockPtr
+= sizeof (TuiWinElement
);
720 tuiFree ((char *) content
);
721 content
= (TuiWinContent
) NULL
;
731 ** addContentElements().
732 ** Adds the input number of elements to the windows's content. If
733 ** no content has been allocated yet, allocContent() is called to
734 ** do this. The index of the first element added is returned,
735 ** unless there is a memory allocation error, in which case, (-1)
739 addContentElements (TuiGenWinInfoPtr winInfo
, int numElements
)
741 TuiWinElementPtr elementPtr
;
744 if (winInfo
->content
== (OpaquePtr
) NULL
)
746 winInfo
->content
= (OpaquePtr
) allocContent (numElements
, winInfo
->type
);
750 indexStart
= winInfo
->contentSize
;
751 if (winInfo
->content
!= (OpaquePtr
) NULL
)
753 for (i
= indexStart
; (i
< numElements
+ indexStart
); i
++)
755 if ((elementPtr
= (TuiWinElementPtr
)
756 xmalloc (sizeof (TuiWinElement
))) != (TuiWinElementPtr
) NULL
)
758 winInfo
->content
[i
] = (Opaque
) elementPtr
;
759 initContentElement (elementPtr
, winInfo
->type
);
760 winInfo
->contentSize
++;
762 else /* things must be really hosed now! We ran out of memory!? */
768 } /* addContentElements */
771 /* Delete all curses windows associated with winInfo, leaving everything
774 tuiDelWindow (TuiWinInfoPtr winInfo
)
776 TuiGenWinInfoPtr genericWin
;
778 switch (winInfo
->generic
.type
)
782 genericWin
= locatorWinInfoPtr ();
783 if (genericWin
!= (TuiGenWinInfoPtr
) NULL
)
785 tuiDelwin (genericWin
->handle
);
786 genericWin
->handle
= (WINDOW
*) NULL
;
787 genericWin
->isVisible
= FALSE
;
789 if (winInfo
->detail
.sourceInfo
.filename
)
791 xfree (winInfo
->detail
.sourceInfo
.filename
);
792 winInfo
->detail
.sourceInfo
.filename
= 0;
794 genericWin
= winInfo
->detail
.sourceInfo
.executionInfo
;
795 if (genericWin
!= (TuiGenWinInfoPtr
) NULL
)
797 tuiDelwin (genericWin
->handle
);
798 genericWin
->handle
= (WINDOW
*) NULL
;
799 genericWin
->isVisible
= FALSE
;
803 if (winInfo
->generic
.content
!= (OpaquePtr
) NULL
)
805 tuiDelDataWindows (winInfo
->detail
.dataDisplayInfo
.regsContent
,
806 winInfo
->detail
.dataDisplayInfo
.regsContentCount
);
807 tuiDelDataWindows (winInfo
->detail
.dataDisplayInfo
.dataContent
,
808 winInfo
->detail
.dataDisplayInfo
.dataContentCount
);
814 if (winInfo
->generic
.handle
!= (WINDOW
*) NULL
)
816 tuiDelwin (winInfo
->generic
.handle
);
817 winInfo
->generic
.handle
= (WINDOW
*) NULL
;
818 winInfo
->generic
.isVisible
= FALSE
;
827 freeWindow (TuiWinInfoPtr winInfo
)
829 TuiGenWinInfoPtr genericWin
;
831 switch (winInfo
->generic
.type
)
835 genericWin
= locatorWinInfoPtr ();
836 if (genericWin
!= (TuiGenWinInfoPtr
) NULL
)
838 tuiDelwin (genericWin
->handle
);
839 genericWin
->handle
= (WINDOW
*) NULL
;
841 freeWinContent (genericWin
);
842 if (winInfo
->detail
.sourceInfo
.filename
)
844 xfree (winInfo
->detail
.sourceInfo
.filename
);
845 winInfo
->detail
.sourceInfo
.filename
= 0;
847 genericWin
= winInfo
->detail
.sourceInfo
.executionInfo
;
848 if (genericWin
!= (TuiGenWinInfoPtr
) NULL
)
850 tuiDelwin (genericWin
->handle
);
851 genericWin
->handle
= (WINDOW
*) NULL
;
852 freeWinContent (genericWin
);
856 if (winInfo
->generic
.content
!= (OpaquePtr
) NULL
)
859 winInfo
->detail
.dataDisplayInfo
.regsContent
,
860 winInfo
->detail
.dataDisplayInfo
.regsContentCount
);
861 winInfo
->detail
.dataDisplayInfo
.regsContent
=
862 (TuiWinContent
) NULL
;
863 winInfo
->detail
.dataDisplayInfo
.regsContentCount
= 0;
865 winInfo
->detail
.dataDisplayInfo
.dataContent
,
866 winInfo
->detail
.dataDisplayInfo
.dataContentCount
);
867 winInfo
->detail
.dataDisplayInfo
.dataContent
=
868 (TuiWinContent
) NULL
;
869 winInfo
->detail
.dataDisplayInfo
.dataContentCount
= 0;
870 winInfo
->detail
.dataDisplayInfo
.regsDisplayType
=
872 winInfo
->detail
.dataDisplayInfo
.regsColumnCount
= 1;
873 winInfo
->detail
.dataDisplayInfo
.displayRegs
= FALSE
;
874 winInfo
->generic
.content
= (OpaquePtr
) NULL
;
875 winInfo
->generic
.contentSize
= 0;
881 if (winInfo
->generic
.handle
!= (WINDOW
*) NULL
)
883 tuiDelwin (winInfo
->generic
.handle
);
884 winInfo
->generic
.handle
= (WINDOW
*) NULL
;
885 freeWinContent (&winInfo
->generic
);
887 if (winInfo
->generic
.title
)
888 xfree (winInfo
->generic
.title
);
894 ** freeAllSourceWinsContent().
897 freeAllSourceWinsContent (void)
901 for (i
= 0; i
< (sourceWindows ())->count
; i
++)
903 TuiWinInfoPtr winInfo
= (TuiWinInfoPtr
) (sourceWindows ())->list
[i
];
905 if (m_winPtrNotNull (winInfo
))
907 freeWinContent (&(winInfo
->generic
));
908 freeWinContent (winInfo
->detail
.sourceInfo
.executionInfo
);
913 } /* freeAllSourceWinsContent */
920 freeWinContent (TuiGenWinInfoPtr winInfo
)
922 if (winInfo
->content
!= (OpaquePtr
) NULL
)
924 freeContent ((TuiWinContent
) winInfo
->content
,
925 winInfo
->contentSize
,
927 winInfo
->content
= (OpaquePtr
) NULL
;
929 winInfo
->contentSize
= 0;
932 } /* freeWinContent */
936 tuiDelDataWindows (TuiWinContent content
, int contentSize
)
941 ** Remember that data window content elements are of type TuiGenWinInfoPtr,
942 ** each of which whose single element is a data element.
944 for (i
= 0; i
< contentSize
; i
++)
946 TuiGenWinInfoPtr genericWin
= &content
[i
]->whichElement
.dataWindow
;
948 if (genericWin
!= (TuiGenWinInfoPtr
) NULL
)
950 tuiDelwin (genericWin
->handle
);
951 genericWin
->handle
= (WINDOW
*) NULL
;
952 genericWin
->isVisible
= FALSE
;
957 } /* tuiDelDataWindows */
961 freeDataContent (TuiWinContent content
, int contentSize
)
966 ** Remember that data window content elements are of type TuiGenWinInfoPtr,
967 ** each of which whose single element is a data element.
969 for (i
= 0; i
< contentSize
; i
++)
971 TuiGenWinInfoPtr genericWin
= &content
[i
]->whichElement
.dataWindow
;
973 if (genericWin
!= (TuiGenWinInfoPtr
) NULL
)
975 tuiDelwin (genericWin
->handle
);
976 genericWin
->handle
= (WINDOW
*) NULL
;
977 freeWinContent (genericWin
);
980 freeContent (content
,
985 } /* freeDataContent */
988 /**********************************
989 ** LOCAL STATIC FUNCTIONS **
990 **********************************/
997 freeContent (TuiWinContent content
, int contentSize
, TuiWinType winType
)
999 if (content
!= (TuiWinContent
) NULL
)
1001 freeContentElements (content
, contentSize
, winType
);
1002 tuiFree ((char *) content
);
1010 ** freeContentElements().
1013 freeContentElements (TuiWinContent content
, int contentSize
, TuiWinType type
)
1015 if (content
!= (TuiWinContent
) NULL
)
1019 if (type
== SRC_WIN
|| type
== DISASSEM_WIN
)
1021 /* free whole source block */
1022 if (content
[0]->whichElement
.source
.line
!= (char *) NULL
)
1023 tuiFree (content
[0]->whichElement
.source
.line
);
1027 for (i
= 0; i
< contentSize
; i
++)
1029 TuiWinElementPtr element
;
1031 element
= content
[i
];
1032 if (element
!= (TuiWinElementPtr
) NULL
)
1037 tuiFree ((char *) element
);
1041 ** Note that data elements are not allocated
1042 ** in a single block, but individually, as needed.
1044 if (element
->whichElement
.data
.type
!= TUI_REGISTER
)
1046 element
->whichElement
.data
.name
);
1047 tuiFree ((char *) element
->whichElement
.data
.value
);
1048 tuiFree ((char *) element
);
1051 tuiFree ((char *) element
->whichElement
.command
.line
);
1059 if (type
!= DATA_WIN
&& type
!= DATA_ITEM_WIN
)
1060 tuiFree ((char *) content
[0]); /* free the element block */
1064 } /* freeContentElements */