hessmann@unipas.fmi.uni-passau.de (Georg Hessmann) (03/08/90)
Please help, I have some trouble with the ARP-filerequester and it's wildcardfunction. This is a repost, since I have seen no reaction on my first article. Either my posting failed or nobody was interested in my problem:-( 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! So, I can't get any information about the file. What's wrong?? Please answer via e-mail. I'm also interested on the mail adress of one of the ARP-developers. 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
davidw@telxon.UUCP (David Wright) (03/09/90)
I tried to reply to you before, but I couldn't get through from the site I was at. Hopefully this will get to you. I don't do the wildcards quite the way you do, but on the other hand I don't have a problem, either :-) I did the wildcards within the ARP filerequester itself, bu using the filename field. I did this in CoreWar and in CRobots, and it has worked very well. Basically, I set the mask to the file names I want, and reset it after I have copied out the filename the user selected. This also has the advantage of keeping the direcory the user may have selected, but turning on the wildcards in the directory the next time through. Should the user not want the wildcards, they are free to click in the file name box, and the mask dissappears automatically. I also have worked with the ARP command-line wildcard functions, and while they are not as easy to use as the file request functions, they too work flawlessly, and are quite easy to use, once you get the hang of it. I can send you the portion of CRobots that does the file reuesting, and also the command line handling, if you want. Dave