From: CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 20-JUN-1991 23:49:49.98 To: ARISIA::EVERHART CC: Subj: Re: Undocumented SHELL$nnn_mmm() functions From: RELAY-INFO-VAX@CRVAX.SRI.COM@SMTP@CRDGW2 To: Everhart@Arisia@MRGATE Received: by crdgw1.ge.com (5.57/GE 1.100) id AA19596; Thu, 20 Jun 91 23:32:42 EDT Received: From UCBVAX.BERKELEY.EDU by CRVAX.SRI.COM with TCP; Thu, 20 JUN 91 15:12:32 PDT Received: by ucbvax.Berkeley.EDU (5.63/1.42) id AA09434; Thu, 20 Jun 91 15:04:35 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-vax@kl.sri.com (info-vax@kl.sri.com) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 20 Jun 91 21:29:20 GMT From: agate!spool.mu.edu!sdd.hp.com!news.cs.indiana.edu!arizona.edu!leonard@ucbvax.Berkeley.EDU Organization: University of Arizona Subject: Re: Undocumented SHELL$nnn_mmm() functions Message-Id: <1991Jun20.142920.829@arizona.edu> References: <9106201606.AA27978@ucbvax.Berkeley.EDU> Sender: info-vax-request@kl.sri.com To: info-vax@kl.sri.com In article <9106201606.AA27978@ucbvax.Berkeley.EDU>, BDOWNING@FORDMULC.BITNET writes: > Original post from Ed Wilts EdWilts@BCSC02.BITNET > >> >> Quite a while back, someone posted documentation and/or sample code >> for the shell$ run-time library routines (SHELL$TO_VMS, >> SHELL$FROM_VMS, SHELL$MATCH_WILD, SHELL$FIX_TIME) but I no longer have >> them. These are available in the Vax C RTL, but are not documented in >> the C manuals, except to say "don't worry about calling these". I >> have some code that might benefit by calling these directly. I would >> appreciate whatever documentation people have on these routines. > > I've been waiting quite a while now to see any responses to this. I've > been trying to modify a file cd.c posted to the net a while back that > makes use of these functions, but I really need more info. I wrote to > Ed Wilts and he said that he never received any replies to his post. > If ANYONE has ANY code and/or local documentation regarding these functions > could you please post it to the list? Well, I *think* they're documented in the DECshell manual, not that I have any such handy. I did manage to get SHELL$TO_VMS and SHELL$FROM_VMS working, and here's the code that did it. - Aaron Aaron Leonard (AL104), University of Arizona Telecommunications, Tucson AZ 85721 /* unix-emul.c * Library of routines to emulate any U*x functions that I couldn't * scrounge up elsewhere under VMS. Not warranted to be any good. * * Last modified: 7-Oct-1989/al * * 7-Oct-1989 al First version * */ #include stdio /* unlink * We just delete, tough luck if you expected something else. * */ int unlink(filename) char *filename; { int delete(); int status; status = delete(filename); return (status); } /* unlink */ static char ux_emul_vms_filespec[255]; /* a place to stash the VMS-y filespec * that SHELL$TO_VMS returns */ /* unix_filespec_to_vms * Use SHELL$TO_VMS to translate a U*x-y filespec to a VMS-y one. * * Returns: 0 if no filenames matched the input filespec, else 1. * Returns the first matching VMS-y filespec in first arg. * */ int unix_filespec_to_vms(vmsspec, unixspec) char *vmsspec; char *unixspec; /* possibly wild */ { int ux_emul_act_routine(), SHELL$TO_VMS(); int num_files_found; num_files_found = SHELL$TO_VMS(unixspec, ux_emul_act_routine, 1); if (num_files_found != 1) return (0); strcpy(vmsspec, ux_emul_vms_filespec); return (1); } /* unix_filespec_to_vms */ int ux_emul_act_routine(fspec) char *fspec; { /* this routine is fired off by SHELL$TO_VMS if it finds any files. */ strcpy(ux_emul_vms_filespec, fspec); /* stash the filename */ return (0); /* don't get called again */ }