EasyManua.ls Logo

Texas Instruments TI-89 - Page 1072

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...
1030
Appendix A: System Routines — Symbol Table Utilities
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
SetOK
(continued)
Example:
This example sets the global OK variable to 1 if the graph is blank or 0 if it
is not blank (axes not included).
#include "tiams.h"
void main(void)
{ Access_AMS_Global_Variables;
WORD SaveSize;
HANDLE hBitmap;
BYTE *Ptr;
WIN_RECT wr;
BOOL flag;
WINDOW *winPtr;
wr = *MakeWinRect(0,0,gr_active->xmaxpix,gr_active->ymaxpix);
winPtr = gr_active->grwinp;
if ((SaveSize = WinBitmapSize( winPtr, &wr )) > 0) {
if (hBitmap = HeapAlloc(SaveSize)) {
Ptr = HeapDeref(hBitmap);
flag = WinDupStat( winPtr, TRUE );
WinBitmapGet( winPtr, &wr, (BITMAP *) Ptr );
WinDupStat( winPtr, flag );
SaveSize -= BITMAP_HDR_SIZE;
Ptr += BITMAP_HDR_SIZE;
flag = TRUE;
while (SaveSize--) {
if (*Ptr++) {
flag = FALSE;
break;
}
}
HeapFree( hBitmap );
SetOK( flag );
} else
ER_THROW( ER_MEMORY );
} else
ER_THROW( ER_RESERVED );
}

Table of Contents

Other manuals for Texas Instruments TI-89

Related product manuals