?RCS: $Id: Getfile.U 1 2006-08-24 12:32:52Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
-?RCS:
+?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
-?RCS:
+?RCS:
?RCS: $Log: Getfile.U,v $
?RCS: Revision 3.0.1.7 1997/02/28 15:01:06 ram
?RCS: patch61: getfile script now begins with "startsh"
?RCS: Revision 3.0 1993/08/18 12:04:56 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?X:
+?X:
?X: This unit produces a bit of shell code that must be dotted in in order
?X: to get a file name and make some sanity checks. Optionally, a ~name
?X: expansion is performed.
-?X:
+?X:
?X: To use this unit, $rp and $dflt must hold the question and the
?X: default answer, which will be passed as-is to the myread script.
?X: The $fn variable must hold the file type (f or d, for file/directory).
?X: rp='Where is the active file?'
?X: . ./getfile
?X: active="$ans"
-?X:
+?X:
?X: If the 'p' (path) letter is specified along with 'l', then an answer
?X: without a leading / will be expected to be found in everyone's path.
?X:
?X: is defined, the original un-expanded answer which is stored in value
?X: would lead to "non-existent" error messages whilst ansexp has been
?X: properly expanded. -- Fixed by Jan.Djarv@sa.erisoft.se (Jan Djarv)
-?X: Always expand ~user if '/' was requested
+?X: Always expand ~user if '/' was requested
case "$ansexp" in
/*) value="$ansexp" ;;
?X: Allow for c:/some/path