Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!husc6!sri-unix!sri-spam!ames!sdcsvax!ucbvax!YALE.ARPA!LEICHTER-JERRY From: LEICHTER-JERRY@YALE.ARPA Newsgroups: comp.os.vms Subject: Re: 2 questions: VAX-C RTL calls and VMS .DIR file entries Message-ID: <8706181906.AA04846@ucbvax.Berkeley.EDU> Date: Thu, 18-Jun-87 15:57:10 EDT Article-I.D.: ucbvax.8706181906.AA04846 Posted: Thu Jun 18 15:57:10 1987 Date-Received: Sun, 21-Jun-87 15:09:07 EDT Sender: steve@ucbvax.BERKELEY.EDU Reply-To: Distribution: world Organization: The ARPA Internet Lines: 42 ...Listed in the VAX-C manual are references to some run-time functions that are otherwise undocumented. I did a lib/list on the VAXCRTL.OLB file and verified that the following routines do exist: shell$from_vms -- translate VMS filespecs to UNIX filespecs shell$to_vms -- translate UNIX filespecs to VMS filespecs shell$cli_name -- determine user's command interpreter shell$fix_time -- convert VMS time to UNIX format shell$clint -- interface to argument lists under shell shell$wild -- wildcard expansion to infinite names. Does anyone have a copy of the correct calling sequences for these? These functions are documented in the DEC Shell documentation. The calling sequences are somewhat complex - e.g., shell$from_vms is given the address of an action routine to pass each translated file spec to (there can be many if the input had wild-cards) - so it's probably best if you get a copy of the documentation. The second question concerns VMS directories. I have perused the "orange manuals" for the last two weeks looking for something that des- cribes the VMS directory files' organization.... Does anyone have a com- the information? The internal format of directory files is undocumented. (However, the infor- mation does appear as part of the ODS-II specification; copies of this have appeared in DECUS publications.) (For the curious, I am trying to convert some systems programs that I have from BSD UNIX to run under VMS, and I need the OPENDIR, READDIR, CLOSEDIR, and IOCTL functions; hence, I am trying to write them, and meeting with little success... any help will be greatly appreciated.) There's no simple way to do this. Where Unix programs read directories as files, VMS programs use the $SEARCH function of RMS. The ideal approach would be to convert the USE of the functions. Failing that, use $SEARCH to look for *.*;*, which will give you all the file specs; you can then use them to build whatever data structure you like. -- Jerry -------