home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 2: PC
/
frozenfish_august_1995.bin
/
bbs
/
d01xx
/
d0128.lha
/
MRBackup
/
MiscRequest.c
< prev
next >
Wrap
C/C++ Source or Header
|
1988-01-02
|
2KB
|
65 lines
/* Miscellaneous requester support routines. */
#include <exec/memory.h>
#include <intuition/intuition.h>
#include <intuition/intuitionbase.h>
#include <libraries/dosextens.h>
#include <graphics/text.h>
#include <functions.h>
#include <ctype.h>
struct IntuiText diskreq_body_text = {
AUTOFRONTPEN, /* FrontPen */
AUTOBACKPEN, /* BackPen */
AUTODRAWMODE, /* DrawMode */
AUTOLEFTEDGE, /* LeftEdge */
AUTOTOPEDGE, /* TopEdge */
NULL, /* ITextFont Pointer */
(UBYTE *)"", /* IText */
NULL /* NextText */
};
struct IntuiText diskreq_pos_text = {
AUTOFRONTPEN, /* FrontPen */
AUTOBACKPEN, /* BackPen */
AUTODRAWMODE, /* DrawMode */
AUTOLEFTEDGE, /* LeftEdge */
AUTOTOPEDGE, /* TopEdge */
NULL, /* ITextFont Pointer */
(UBYTE *)"OK", /* IText */
NULL /* NextText */
};
struct IntuiText diskreq_neg_text = {
AUTOFRONTPEN, /* FrontPen */
AUTOBACKPEN, /* BackPen */
AUTODRAWMODE, /* DrawMode */
AUTOLEFTEDGE, /* LeftEdge */
AUTOTOPEDGE, /* TopEdge */
NULL, /* ITextFont Pointer */
(UBYTE *)"Cancel", /* IText */
NULL /* NextText */
};
/* Generate an autorequest for the insertion of a floppy disk.
* Called with:
* window: pointer to window for request
* drivespec: the disk drive name
*/
int
RequestDisk(window, drivespec)
struct Window *window; char *drivespec;
{
UBYTE prompt[41];
strcpy(prompt,"Insert blank disk in ");
strncat(prompt,drivespec,(sizeof(prompt)-strlen(prompt)-1));
diskreq_body_text.IText = prompt;
return AutoRequest(
window, &diskreq_body_text, &diskreq_pos_text,
&diskreq_neg_text, DISKINSERTED, NULL, 300L, 50L);
}