Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site wateng.UUCP Path: utzoo!watmath!watdaisy!wateng!padpowell From: padpowell@wateng.UUCP (PAD Powell [Admin]) Newsgroups: net.general Subject: Full Path Name Printer? Message-ID: <544@wateng.UUCP> Date: Wed, 23-Nov-83 09:21:36 EST Article-I.D.: wateng.544 Posted: Wed Nov 23 09:21:36 1983 Date-Received: Thu, 24-Nov-83 00:53:34 EST Distribution: net.general Organization: U of Waterloo, Ontario Lines: 21 I am looking for a program or function that will generate the full path name of a file. It should remove all of the ~, ., and .. references in the file name. I have seen this used in some programs, but have not been impressed with some of the techniques used. The calling sequence of the function should be: int full_path( src, dest, max_dest_len ) char *src, /*source string containing file name */ char *dest; /*destination string for full path name */ int max_dest_len; /* size of dest string */ returns: the length of the full path name, or 0 if the dest string size is exceeded. The dest string should be 0 terminated. If there is a program, then I would invoke the thing using the POPEN facility of the STDIO package, and pass it a set of strings. This thing should run unbuffered, so that I get the strings back. I would like to have this work under 4.1 and 4.2 if possible. I thought there was a shell command to do this, but it does not seem to optimize. Patrick Powell, VLSI Research Group, U. Waterloo, Waterloo, Ont.