/* * kd_freq.library Test for Lattice */ #include "KDBase.h" UBYTE directory[128]; UBYTE filename[32]; UBYTE pattern[32]; struct Library *KD_FReqBase; struct ExtraData extras; /* FReq() prototype */ ULONG FReq(struct Screen *, UBYTE *, UBYTE *, UBYTE *, UBYTE *, ULONG, struct ExtraData *); void 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:"); } }