1048
Appendix A: System Routines — Symbol Table Utilities
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
VarRecall
(continued)
Example:
See
GetDataType
for another example.
/* This is the FILE FDelete function. It uses VarRecall to look-up the file to be
deleted. If it is not found or is locked, in use, a folder, or in the archive an
error is returned. Otherwise HSymDel is used to delete the variable.
*/
WORD FDelete( const char *fileName ) {
HSYM hSym;
BYTE TokFName[MAX_SYM_LEN];
if (FS_OK != TokenizeName(fileName, TokFName))
return( FS_BAD_NAME );
if (hSym = VarRecall(TokNameRight(TokFName), VR_NO_SYS_VARS ))
if (!(DerefSym(hSym)->Flags & (SF_LOCK | SF_INUSE | SF_FOLDER | SF_EXTMEM |
SF_EM_TWIN))) {
HSymDel( hSym );
return( FS_OK );
}
return( FS_ERROR );
}