home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
339.lha
/
KLib
/
manx.test.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-01-24
|
1KB
|
65 lines
/*
* kd_freq.library Test
*
* Tested on Manx 3.60a.
*/
#include "KDBase.h"
UBYTE directory[128];
UBYTE filename[32];
UBYTE pattern[32];
/* for Manx.. we don't need any parsing */
void _wb_parse() {}
void _cli_parse() {}
struct Library *KD_FReqBase, *OpenLibrary();
struct ExtraData extras;
main()
{
KD_FReqBase = OpenLibrary(KLIBNAME,KLIBVERSION);
if (KD_FReqBase)
{
/* Make sure that all default strings are zero'd out. */
directory[0] = filename[0] = pattern[0] = 0;
/* Set default wildcard pattern */
/* strcpy(pattern,"#?.?"); */
/* Call file requester */
extras.oktext = (UBYTE *) "Load";
extras.canceltext = (UBYTE *) "No Way!";
if (FReq(NULL,
"Test of 'kd_freq.library'",
filename,directory,pattern, FR_CANCELTEXT |
FR_OKTEXT | FR_AUTOPOSITION | FR_AUTOSIZE | FR_NOINFO | FR_SCREENFONT
,&extras))
{
/* You can immediately strcat(directory,filename); since
directory will contain the valid file seperator (either
\ or : at the end of the directory name
*/
puts(directory);
puts(filename);
}
else
{
puts("Requester Cancelled!");
}
CloseLibrary(KD_FReqBase);
}
else
{
puts("Can't Open 'kd_freq.library'. Make sure it is in LIBS:");
}
}