EasyManua.ls Logo

Texas Instruments TI-89 - Page 1092

Texas Instruments TI-89
1398 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
1050
Appendix A: System Routines — Symbol Table Utilities
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
VarStore
(continued)
Example:
/* This example routine stores to the variable 'var' the region defined by 'wr'
for the WINDOW pointed to by 'winPtr'.
*/
HSYM StoPic( WINDOW *winPtr, EStackIndex var, WIN_RECT *wr )
{ WORD SaveSize;
HSYM hsym;
void *Ptr;
EStackIndex varI;
BOOL oldFlag;
SYM_ENTRY *symPtr;
if ((SaveSize = WinBitmapSize( winPtr, wr )) > 0) {
if (hsym = VarStore(var, PIC_VAR_TAG, SaveSize+1)) {
symPtr = DerefSym( hsym );
symPtr->Version = TV_TI_92; /* PICs are same across all versions */
Ptr = HeapDeref(symPtr->hVal);
(*(WORD *) Ptr) = SaveSize + 1; /* store size of picture */
Ptr = (BYTE *) Ptr + 2; /* skip size */
(*((BYTE *) Ptr + SaveSize)) = PIC_VAR_TAG; /* store tag */
oldFlag = WinDupStat( winPtr, FALSE ); /* get backup image if have one */
WinBitmapGet( winPtr, wr, (BITMAP *) Ptr ); /* get image data */
WinDupStat( winPtr, oldFlag ); /* restore DupStat */
} else
ER_THROW( ER_RESERVED );
} else
ER_THROW( ER_DIMENSION );
return( hsym );
}

Table of Contents

Other manuals for Texas Instruments TI-89

Related product manuals