From: HENRY::IN%"info-vax-request%kl.sri.com%kl.sri.com%csnet-relay.CSNET%relay.cs.net@RCA.COM" 19-JUN-1987 09:37 To: info-vax@KL.SRI.COM Subj: shell$to_vms calling sequence Someone asked about the shell$to_vms (and other) functions: Carl J Lydick wrote: > SHELL$TO_VMS > > num_files_found = > shell$to_vms( vms_filespec, action_routine, wild_card ) > > char *vms_filespec; > int wild_card; > int action_routine(); > int shell$to_vms(); This interested me, because I need just a routine myself. I did some testing and came up with the following (note; this is from my observations and may not be 100% accurate). 1) The action routine is called with two arguments (actually: according to the stack frame two longwords). The first I assume to be a pointer to the vms translated name (it printf's okay). The second always seems to be the value 1. Whats the scoop? Anybody know? 2) The action routine can return 0 or 1. A return code of 0 tells shell$to_vms not to call it again and return to the caller, useful in wildcard matching. A return code of 1 will cause shell$to_vms to call the action routine again with the next file found - in the case of wildcard matching. 3) shell$to_vms calls sys$parse() and sys$search(). (I stepped into shell$to_vms with the debugger...). 4) shell$to_vms requires that each directory exists in order to convert the UNIX file spec. I assume that this is a side affect of calling sys$parse which also require that the directories exist. 5) shell$to_vms is written in BLISS (according to the debugger). Item 4 above is a royal pain. I would like a routine that converted the UNIX file spec to VMS regardless of whether it exists or not. I guess I shall have to write my own... Can anybody fill in the missing holes in the above??? BTW we are running uVMS 4.5 with VAXC V2.3. I have the C code for the above testing if anybody wants it. Cheers! John Weald -- UUCP: {sdencore,cbosgd,amdahl,ptsfa,dana}!aussjo!john UUCP: {styx,imagen,dlb,gould,sci,altnet}!auspyr!john