.ig Copyright (C) 1993,1994 by the author(s). This software is published in the hope that it will be useful, but WITHOUT ANY WARRANTY for any part of this software to work correctly or as described in the manuals. See the ShapeTools Public License for details. Permission is granted to use, copy, modify, or distribute any part of this software but only under the conditions described in the ShapeTools Public License. A copy of this license is supposed to have been given to you along with ShapeTools in a file named LICENSE. Among other things, this copyright notice and the Public License must be preserved on all copies. Author: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) $Header: af_misc.3[7.0] Fri Jun 25 14:33:12 1993 andy@cs.tu-berlin.de frozen $ .. .TH af_misc 3 "Fri Jun 25 14:33:12 1993" "AtFS-1.71" "Attribute Filesystem (AtFS)" .SH NAME af_afname, af_afpath, af_aftype, af_afuser, af_setarchpath, af_version \- miscellaneous AtFS functions .SH SYNOPSIS #include .sp .ta 1.5c char *af_afname (char *path) .sp char *af_afpath (char *path) .sp char *af_aftype (char *path) .sp Af_user *af_afuser (uit_t uid) .sp char *af_setarchpath (char *path) .sp char *af_version (void) .sp .SH DESCRIPTION The functions \fIaf_afname, af_afpath\fP and \fIaf_aftype\fP extract name, syspath or type from a given (operating system dependent) file identification. In an \s-1UNIX\s+1 environment, a given pathname of the form .LP .RS .nf \fB/usr/lib/libatfs.a\fP leads to afname \fBlibatfs\fP, afpath \fB/usr/lib\fP and aftype \fBa\fP. .fi .RE .LP If no path (eg. \fBotto.c\fP), or no type (eg. \fB/usr/hugo/Makefile\fP) is given, the corresponding routine returns an empty string. A period as first character in a filename is always considered to be part of the name (e.g. \fB.cshrc\fP has the name \fB.cshrc\fP and an empty type string). "\fB.\fP" and "\fB..\fP" are recognized as names. Archive file extensions and AtFS specific path extensions are stripped from the resulting name resp. pathname. .br \fBNote:\fP af_afname, af_afpath and af_aftype use static memory for the returned results. Subsequent calls of the same function overwrite former results. .LP \fIaf_afuser\fP returns an AtFS user identification which consists of the login name of the user identified by \fIuid\fP, the current host and the current domain. \fIUid_t\fP is defined according to the return type of \fIgetuid (2)\fP on your system. The \fIAf_user\fP type has the following structure .RS .sp 0.1i .nf typedef struct { char af_username[\s-1MAXUSERNAMELEN\s+1]; char af_userhost[\s-1MAXHOSTNAMELEN\s+1]; char af_userdomain[\s-1MAXDOMAIN+1\s+1]; } Af_user; .fi .sp 0.1i .RE .LP \fIaf_setarchpath\fP defines the location of the AtFS archive files. A nil-pointer given as \fIpath\fP-argument clears the former setting of the global archive path. af_setarchpath returns the old global archive path. Initially, no global archive path is set. In this case, all archive files are stored in a subdirectory called \fBAtFS\fP, relative to the directory where corresponding busy version resides. .LP \fIaf_version\fP returns a string that names the version and the creator of the currently used AtFS library. .SH SEE ALSO getuid(2)