summaryrefslogtreecommitdiff
path: root/itcl/itcl/doc/Stack.3
blob: e5ce210151559bb69ca79ee29a409e131b2e8973 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
'\"
'\" Copyright (c) 1993-1998  Lucent Technologies, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: $Id$
'\"
.so man.macros
.TH Itcl_InitStack 3 3.0 itcl "[incr\ Tcl] Library Procedures"
.BS
'\" Note:  do not modify the .SH NAME line immediately below!
.SH NAME
Itcl_InitStack, Itcl_DeleteStack, Itcl_PushStack, Itcl_PopStack, Itcl_PeekStack, Itcl_GetStackValue, Itcl_GetStackSize \- Manipulate an Itcl stack object.
.SH SYNOPSIS
.nf
\fB#include <itcl.h>\fR
.sp
int
\fBItcl_InitStack\fR(\fIstack\fR)
.sp
int
\fBItcl_DeleteStack\fR(\fIstack\fR)
.sp
int
\fBItcl_PushStack\fR(\fIcdata, stack\fR)
.sp
ClientData
\fBItcl_PopStack\fR(\fIstack\fR)
.sp
ClientData
\fBItcl_PeekStack\fR(\fIstack\fR)
.sp
ClientData
\fBItcl_GetStackValue\fR(\fIstack, pos\fR)
.sp
int
\fBItcl_GetStackSize\fR(\fIstack\fR)
.SH ARGUMENTS
.AP Itcl_Stack *stack in
Stack info structure.
.AP int pos in
position in stack order from the top.
.AP ClientData clientData in
Arbitrary one-word value to save in the stack.
.BE

.SH DESCRIPTION
.PP
\fBItcl_InitStack\fR initializes a stack structure and \fBItcl_DeleteStack\fR
deletes it. \fBItcl_PushStack\fR pushes the \fIcdata\fR value onto the stack.
\fBItcl_PopStack\fR removes and returns the top most \fIcdata\fR value.
\fBItcl_PeekStack\fR returns the top most value, but does not remove it.
\fBItcl_GetStackValue\fR gets a value at some index within the stack.  Index
"0" is the first value pushed onto the stack. \fBItcl_GetStackSize\fR
returns the count of entries on the stack.

.SH KEYWORDS
stack