[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference noted::hackers_v1

Title:-={ H A C K E R S }=-
Notice:Write locked - see NOTED::HACKERS
Moderator:DIEHRD::MORRIS
Created:Thu Feb 20 1986
Last Modified:Mon Aug 03 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:680
Total number of notes:5456

654.0. "partial-filespec -> full-filespec help" by FOO::BHAVNANI (When in doubt, blame the compiler.) Thu Jan 08 1987 01:57

 I'm  looking  for  a LIB$/SYS$ routine that will return a full filespec from a
 partial one.  Something along the lines of

		gets (filename);
		if ((infile=fopen(filename,"r"))==NULL)
		   {
		     lib$return_full_filespec (filename, fullname);
		     printf ("Error opening %s; as input\n", fullname);
		   }

 such that if the user enters "[--.xyzzy]foo.bar" for filename, and his default 
 directory is "user$disk:[jdoe.test]", my application will say

		Error opening USER$DISK:[XYZZY]FOO.BAR; as input

 I  can  do this using fgetname() if the file *was* opened successfully, but am
 having  a  hard time expanding the filespec when I can't access the file.  Any
 pointers or source code examples :-) would be appreciated.  Tnx much,

 /ravi
T.RTitleUserPersonal
Name
DateLines
654.1Try LIB$FIND_FILEILO::LENIHANJohn Lenihan 353-91-25128Fri Jan 08 1988 08:435
654.2$PARSE RMS serviceSUCASA::LINDQUISTFri Jan 08 1988 12:006
    I believe that if you use the RMS service $PARSE with a
    modifier of FAB$M_OFP (output file parse) and specify an
    expanded string buffer, the expanded string returned will be
    what you're after.
    
    	- Lee
654.3 or DCL f$parse... STAR::DICKINSONPeterFri Jan 08 1988 13:390