/*++ /* NAME /* sane_basename 3 /* SUMMARY /* split pathname into last component and parent directory /* SYNOPSIS /* #include <stringops.h> /* /* char *sane_basename(buf, path) /* VSTRING *buf; /* const char *path; /* /* char *sane_dirname(buf, path) /* VSTRING *buf; /* const char *path; /* DESCRIPTION /* These functions split a pathname into its last component /* and its parent directory, excluding any trailing "/" /* characters from the input. The result is a pointer to "/" /* when the input is all "/" characters, or a pointer to "." /* when the input is a null pointer or zero-length string. /* /* sane_basename() and sane_dirname() differ as follows /* from standard basename() and dirname() implementations: /* .IP \(bu /* They can use caller-provided storage or private storage. /* .IP \(bu /* They never modify their input. /* .PP /* sane_basename() returns a pointer to string with the last /* pathname component. /* /* sane_dirname() returns a pointer to string with the parent /* directory. The result is a pointer to "." when the input /* contains no '/' character. /* /* Arguments: /* .IP buf /* Result storage. If a null pointer is specified, each function /* uses its own private memory that is overwritten upon each call. /* .IP path /* The input pathname. /* LICENSE /* .ad /* .fi /* The Secure Mailer license must be distributed with this /* software. /* AUTHOR(S) /* Wietse Venema /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA
/*--*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.