home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
200-299
/
ff236.lzh
/
DiskHandler
/
request.c
< prev
next >
Wrap
C/C++ Source or Header
|
1989-08-09
|
3KB
|
80 lines
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* |_o_o|\\ Copyright (c) 1988 The Software Distillery. All Rights Reserved */
/* |. o.| || This program may not be distributed without the permission of */
/* | . | || the authors: BBS: (919) 481-6436 */
/* | o | || John Toebes John Mainwaring Jim Cooper */
/* | . |// Bruce Drake Gordon Keener Dave Baker */
/* ====== */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "handler.h"
#include <proto/intuition.h>
int request(global, reqnum, msg)
GLOBAL global;
int reqnum;
char *msg;
{
/* Possible requesters that we can see at this time */
/* 1:
You MUST replace volume
xxxxx
in Unit 0 !!!
2: I/O Error on volume
xxxxx
in Unit 0
?: Unknown Error with volume
xxxxx
in Unit 0
*/
if (global->volume == NULL)
{
*(long *)&global->line3.LeftEdge = 0x0004000EL; /* 4,4 */
global->line1.NextText = &global->line2;
}
else
{
global->line1.NextText = &global->line2;
global->line2.IText = (UBYTE *)BADDR(global->volume->dl_Name)+1;
global->line2.NextText = &global->line3;
}
global->line3.IText = (UBYTE *)&global->buf3;
*(long *)&global->buf3[0] = ('i'<<24)|('n'<<16)|(' '<<8)|'U';
*(long *)&global->buf3[4] = ('n'<<24)|('i'<<16)|('t'<<8)|' ';
*(long *)&global->buf3[8] = ('0'<<24)|(' '<<16)|('!'<<8)|'!';
global->buf3[8] += global->unitnum;
global->buf3[12] = 0;
switch(reqnum)
{
case REQ_MUST:
global->line1.IText = "You MUST replace volume";
break;
case REQ_ERROR:
global->line1.IText = "I/O Error on volume";
global->buf3[9] = 0;
break;
case REQ_GENERAL:
global->line1.IText = msg;
global->buf3[9] = 0;
break;
default:
global->line1.IText = "Unknown error on volume";
break;
}
/* Now we need to put up the requester */
if (IntuitionBase == NULL)
IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library",0);
/* We probably should check and put up an alert.. but later on that */
/* Now display the requester */
return(AutoRequest(NULL, &global->line1,
&global->retrytxt, &global->canceltxt,
DISKINSERTED, 0,
320, 72));
}