1 02/13/84  pathname_
  2 
  3 The pathname_ subroutine contains entry points for constructing
  4 pathnames and archive component pathnames given a directory name, entry
  5 name, and optionally, an archive component name.
  6 
  7 When a directory name and an entry name are combined to form a
  8 pathname, the result may be longer than 168 characters.  If truncating
  9 the pathname doesn't matter, e.g.  in an error message in a call to
 10 com_err_ for another, more important error, then use the pathname_ or
 11 pathname_$component entry points.  These entry points create an invalid
 12 pathname with the characters "PATHNAME TOO LONG" to let the reader know
 13 truncation occured.  If truncating the pathname matters, use the
 14 pathname_$component_check entry point.
 15 
 16 
 17 Entry points in pathname_:
 18    (List is generated by the help command)
 19 
 20 
 21 :Entry: pathname_: 02/13/84 pathname_
 22 
 23 Function: given a directory name and an entry name, returns the
 24 pathname of the entry.
 25 
 26 
 27 Syntax:
 28 declare pathname_ entry (char (*), char (*)) returns (char (168));
 29 path = pathname_ (dirname, entryname);
 30 
 31 
 32 Arguments:
 33 path
 34    is the pathname of the entry in the given directory.  (Output)
 35 dirname
 36    is the pathname of the containing directory.  (Input)
 37 entryname
 38    is the entryname of the entry.  (Input)
 39 
 40 
 41 Notes:  If the resulting pathname is longer than 168 characters, then
 42 the last 20 characters of the result are set to " <PATHNAME TOO LONG>".
 43 
 44 
 45 :Entry:  component:  02/13/84 pathname_$component
 46 
 47 
 48 Function: given a directory name, an entry name, and optionally, an
 49 archive component name, constructs a pathname or an archive component
 50 pathname.
 51 
 52 
 53 Syntax:
 54 declare pathname_$component entry (char (*), char (*), char (*))
 55      returns (char (194));
 56 path = pathname_$component (dirname, entryname, component_name);
 57 
 58 
 59 Arguments:
 60 path
 61    is the pathname of the entry in the given directory, or is an
 62    archive component pathname.  (Output)
 63 dirname
 64    is the pathname of the containing directory.  (Input)
 65 entryname
 66    is the entryname of the entry.  (Input)
 67 component_name
 68    is the name of an archive component, or is null.  (Input)
 69 
 70 
 71 Notes:  If component_name is not null, the archive suffix on the
 72 entryname is optional, and is assumed if not specified.  If
 73 component_name is not null and entryname ends with the archive suffix,
 74 the suffix is omitted from the returned pathname.
 75 
 76 If component_name is null and the resulting pathname is longer than 168
 77 characters, then the last 20 characters of the pathname are set to
 78 " <PATHNAME TOO LONG>". If component_name is not null and the resulting
 79 archive component pathname is longer than 194 characters, then the last
 80 20 characters of the dirname>entryname portion of the archive pathname
 81 are changed to " <PATHNAME TOO LONG>" and the component_name remains in
 82 the pathname.
 83 
 84 
 85 :Entry:  component_check:  02/13/84 pathname_$component_check
 86 
 87 
 88 Function:  This entry point is the same as pathname_$component except a
 89 status code indicates truncation instead of an invalid pathname
 90 containing "PATHNAME TOO LONG".
 91 
 92 
 93 Syntax:
 94 declare pathname_$component_check entry (char (*), char (*), char (*),
 95      char (*), fixed binary (35));
 96 call pathname_$component_check (dirname, entryname, component_name,
 97      path, code);
 98 
 99 
100 Arguments:
101 dirname
102    is the pathname of the containing directory.  (Input)
103 entryname
104    is the entryname of the entry.  (Input)
105 component_name
106    is the name of an archive component, or is null.  (Input)
107 path
108    is the pathname of the entry in the given directory, or is an
109    archive component pathname.  (Output)
110 code
111    is a standard status code.  (Output) It can be:
112    error_table_$pathlong
113       the pathname was truncated.
114 
115 
116 Notes:  If component_name is not null, the archive suffix on the
117 entryname is optional, and is assumed if not specified.  If
118 component_name is not null and entryname ends with the archive suffix,
119 the suffix is omitted from the returned pathname.