home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
240.lha
/
PickPacket_v1.0
/
Sources
/
stinfo.c
< prev
next >
Wrap
C/C++ Source or Header
|
1989-05-04
|
3KB
|
107 lines
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
* |_o_o|\\ Copyright (c) 1989 The Software Distillery. *
* |. o.| || All Rights Reserved *
* | . | || Written by John Toebes and Doug Walker *
* | o | || The Software Distillery *
* | . |// 235 Trillingham Lane *
* ====== Cary, NC 27513 *
* BBS:(919)-471-6436 *
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "pickpack.h"
#include "struct.h"
#include "infogen.h"
static struct IntuiText IText =
{
1,0,JAM2, /* front and back text pens, drawmode and fill byte */
0,0, /* XY origin relative to container TopLeft */
&TOPAZ80, /* font pointer or NULL for default */
NULL, /* pointer to text */
NULL /* next IntuiText structure */
};
static struct IntuiText NameText = {
3,0,JAM2, /* front and back text pens, drawmode and fill byte */
90,13, /* XY origin relative to container TopLeft */
&TOPAZ80, /* font pointer or NULL for default */
NULL, /* pointer to text */
NULL /* next IntuiText structure */
};
void stinfnew(nw, it, stnode)
struct NewWindow **nw;
struct IntuiText **it;
struct STNODE *stnode;
{
*nw = &NewWindowStructure1;
*it = NULL;
return;
}
/* Disk types */
/* Display the struct */
int stinfdisp(n)
struct STNODE *n;
{
char data[100];
struct InfoData *info;
char *msg;
INITTEXT(23)
BUG(1,("stinfodisp: Entry, stnode 0x%08x window 0x%08x\n", n, n->w))
info = n->d.info;
sprintf(data, "id_NumSoftErrors: %10d (Errors on disk)", info->id_NumSoftErrors);
SHOWTEXT
sprintf(data, " id_UnitNumber: 0x%08x (Unit mounted on)", info->id_UnitNumber);
SHOWTEXT
switch(info->id_DiskState)
{
case ID_WRITE_PROTECTED: msg = "(ID_WRITE_PROTECTED)"; break;
case ID_VALIDATING: msg = "(ID_VALIDATING) "; break;
case ID_VALIDATED: msg = "(ID_VALIDATED) "; break;
default: msg = "(unknown state) "; break;
}
sprintf(data, " id_DiskState: 0x%08x %s", info->id_DiskState, msg);
SHOWTEXT
sprintf(data, " id_NumBlocks: %10d (Blocks on Disk)", info->id_NumBlocks);
SHOWTEXT
sprintf(data, "id_NumBlocksUsed: %10d (Blocks in use)", info->id_NumBlocksUsed);
SHOWTEXT
sprintf(data, "id_BytesPerBlock: %10d (Size of data block)", info->id_BytesPerBlock);
SHOWTEXT
switch(info->id_DiskType)
{
case ID_NO_DISK_PRESENT: msg = "(ID_NO_DISK_PRESENT)"; break;
case ID_UNREADABLE_DISK: msg = "(ID_UNREADABLE_DISK)"; break;
case ID_DOS_DISK: msg = "(ID_DOS_DISK) "; break;
case ID_NOT_REALLY_DOS: msg = "(ID_NOT_REALLY_DOS) "; break;
case ID_KICKSTART_DISK: msg = "(ID_KICKSTART_DISK) "; break;
}
sprintf(data, " id_DiskType: 0x%08x %s", info->id_DiskType, msg);
SHOWTEXT
sprintf(data, " id_VolumeNode: 0x%08x (BPTR to volume node)", info->id_VolumeNode);
SHOWTEXT
sprintf(data, " id_InUse: 0x%08x (0 if not in use)", info->id_InUse);
SHOWTEXT
NameText.IText = n->oname;
PrintIText(n->w->RPort, &NameText, 0, 0);
BUG(1, ("stinfodisp: Exit\n"))
return(RC_OK);
}