home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
164.lha
/
ARexx
/
WB_ARexx_v1.1
/
areq.c
< prev
next >
Wrap
C/C++ Source or Header
|
1988-04-28
|
1KB
|
48 lines
/** ARreq.c
*
* Copyright 1988, W.G.J. Langeveld
* All Rights Reserved
* Freely Distributable
*
* This routine puts up a simple boolean requester using the Amiga
* AutoRequest function.
*
**/
#include "functions.h"
#include "exec/types.h"
#include "intuition/intuition.h"
struct IntuiText ARText1 = {0,1,JAM1,15,10,NULL,NULL,NULL,};
struct IntuiText ARText2 = {0,1,JAM1,6,3,NULL,NULL,NULL,};
struct IntuiText ARText3 = {0,1,JAM1,6,3,NULL,NULL,NULL,};
/**
*
* Simple true/false requester, using AutoRequest
*
**/
int AReqBool(window,string,positive,negative)
struct Window *window;
char *string, *positive, *negative;
{
long textlength;
struct IntuiText *a, *b;
ARText1.IText = (UBYTE *)string;
ARText2.IText = (UBYTE *)positive;
ARText3.IText = (UBYTE *)negative;
textlength = IntuiTextLength(&ARText1) + 50L;
a = NULL;
b = NULL;
if (positive != NULL) a = &ARText2;
if (negative != NULL) b = &ARText3;
if (AutoRequest(window,&ARText1,a,b,NULL,NULL,textlength,60L))
return(1);
else
return(0);
}