Sint32 CDC_TgetToc(Uint32 *toc);
Sint32 CDC_GetSes(Sint32 sesno, Uint32 *ses);
Sint32 CDC_CdInit(Sint32 iflag, Sint32 stnby, Sint32 ecc, Sint32 retry);
Sint32 CDC_CdOpen(void);
Sint32 CDC_DataReady(Sint32 dtype);
Sint32 CDC_DataEnd(Sint32 *cdwnum);
...
Sint32 CDC_ChgDir(Sint32 filtno, Sint32 fid);
Sint32 CDC_ReadDir(Sint32 filtno, Sint32 fid);
Sint32 CDC_GetFileScope(Sint32 *fid, Sint32 *infnum, Bool *drend);
Sint32 CDC_TgetFileInfo(Sint32 fid, CdcFile *file);
Sint32 CDC_ReadFile(Sint32 filtno, Sint32 fid, Sint32 offset);
Sint32 CDC_AbortFile(void);
...
etc.
void cdToBackup(int device, BupStat stat)
{
Sint32 numSaves=0;
slPrintHex((numSaves), slLocate(5,numSaves+12));
while(GFS_IdToName(numSaves)!=NULL)
{
slPrintHex((numSaves), slLocate(5,numSaves+4));
slPrint(GFS_IdToName(numSaves), slLocate(5,numSaves+4));
}
slPrintHex((numSaves), slLocate(5,numSaves+11));
}
void cdToBackup(int device, BupStat stat)
{
Uint32 cdWork[GFS_WORK_SIZE(MAX_FILE)/4]; // Allocates space for files
GfsDirTbl dirTable; // Holds Directory control info
GfsDirId dir[MAX_DIR]; // Directory storage info
Sint32 numSaves=2; // The number of saves
GFS_DIRTBL_TYPE(&dirTable) = GFS_DIR_ID;
GFS_DIRTBL_NDIR(&dirTable) = MAX_DIR;
GFS_DIRTBL_DIRID(&dirTable) = dir;
GFS_Init(MAX_FILE, cdWork, &dirTable);
GFS_SetDir(&dirTable);
slPrintHex((numSaves), slLocate(5,numSaves+12));
while(GFS_IdToName(numSaves)!=NULL)
{
slPrintHex((numSaves), slLocate(5,numSaves+4));
slPrint(GFS_IdToName(numSaves), slLocate(5,numSaves+4));
numSaves++;
}
slPrintHex((numSaves), slLocate(5,numSaves+11));
}
Sint32 stat;
stat= slCdChgDir(dirname);
file_max = stat-2;
sprintf(toto,"filename: %s", GFS_IdToName(file_id));
slPrint(toto,slLocate(25,1));
void cdToBackup(int device, BupStat stat)
{
Uint32 cdWork[GFS_WORK_SIZE(MAX_FILE)/4]; // Allocates space for files
GfsDirTbl dirTable; // Holds Directory control info
GfsDirId dir[MAX_DIR]; // Directory storage info
Sint32 numSaves; // The number of saves
Sint32 ret, temp;
char* file;
GFS_DIRTBL_TYPE(&dirTable) = GFS_DIR_ID;
GFS_DIRTBL_NDIR(&dirTable) = MAX_DIR;
GFS_DIRTBL_DIRID(&dirTable) = dir;
ret = GFS_Init(MAX_FILE, cdWork, &dirTable);
if(ret<=2)
{
slPrint("Error!!!", slLocate(5,7));
pressStart();
}
numSaves = slCdChgDir("SAVES");
for( temp = 3; temp <numSaves; temp++)
{
sprintf(file,"filename: %s", GFS_IdToName(temp));
slPrint(file,slLocate(3+temp,1));
slPrintHex(temp, slLocate(20,temp));
}
}
#include "sgl_cd.h" // Required for cd access
#define MAX_FILE 20 // Needed for CD functions
void cdToBackup(int device, BupStat stat)
{
slCdInit(MAX_FILE, dirwork); // initializes cd
slCdChgDir("SAVES"); // Changes to SAVES directory
// Displays all the saves on the CD
for(temp = 2;GFS_IdToName(temp)!=NULL; temp++)
{
slPrint(GFS_IdToName(temp),slLocate(5,temp+4));
}
// Displays go back option
slPrint("Back", slLocate(5, temp+4));