Article View: comp.sys.amiga.tech
Article #13961ARP-filerequester - wildcards
From: Georg Hessmann
Date: Thu, 01 Mar 1990 13:04
Date: Thu, 01 Mar 1990 13:04
50 lines
1643 bytes
1643 bytes
Hello,
I have some trouble with the ARP-filerequester and it's
wildcardfunction.
I initialize the filerequest structure with the following function:
void init_fr()
{
void (*func)();
func = (void *)&fr_func;
file_req = ArpAllocFreq();
if (file_req == NULL) exit(10);
file_req->fr_Hail = "Load new DVI-File:";
file_req->fr_FuncFlags |= FRF_Do_WildFunc;
file_req->fr_Function = func;
}
My wildcard-function looks like:
long __stdargs fr_func(mask,object)
LONGBITS mask;
CPTR object;
{
struct FileInfoBlock *fib = (struct FileInfoBlock *)object;
char hptr;
if (mask != FRF_DoWildFunc) return 0L; /* never occures */
if (fib->fib_EntryType >0) return 0L; /* directory */
hptr = strrchr(fib->fib_FileName,'.');
if (hptr == NULL) return 1L;
if (strcmp(hptr,".dvi")) return 1L;
return 0L;
}
This function will be called for every file and
the mask is correctly set to FRF_WildFunc. But the object pointer
doesn't point to a FileInfoBlock structure.
What's wrong??
I have ARP-version 39.1 and the size of the arp.library is 17100 bytes.
Thanks
Georg.
--
hessmann@unipas.fmi.uni-passau.de hessmann@unipas.uucp
Technical Details
Message-ID:
<937@unipas.fmi.uni-passau.de>Path:
arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!unido!unipas!hessmannShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!unido!unipas!hessmann From: hessmann@unipas.fmi.uni-passau.de (Georg Hessmann) Newsgroups: comp.sys.amiga.tech Subject: ARP-filerequester - wildcards Message-ID: <937@unipas.fmi.uni-passau.de> Date: 1 Mar 90 13:04:36 GMT Reply-To: hessmann@unipas.fmi.uni-passau.de (Georg Hessmann) Organization: University of Passau, W-Germany Lines: 50