#, fuzzy msgid "" msgstr "" "Project-Id-Version: man-pages-l10n VERSION\n" "POT-Creation-Date: 2014-07-17 17:54+0900\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: TH #: man-pages/man3/basename.3:27 #, no-wrap msgid "BASENAME" msgstr "" #. type: TH #: man-pages/man3/basename.3:27 #, no-wrap msgid "2014-06-13" msgstr "" #. type: TH #: man-pages/man3/basename.3:27 #, no-wrap msgid "GNU" msgstr "" #. type: TH #: man-pages/man3/basename.3:27 #, no-wrap msgid "Linux Programmer's Manual" msgstr "" #. type: SH #: man-pages/man3/basename.3:28 #, no-wrap msgid "NAME" msgstr "" #. type: Plain text #: man-pages/man3/basename.3:30 msgid "basename, dirname - parse pathname components" msgstr "" #. type: SH #: man-pages/man3/basename.3:30 #, no-wrap msgid "SYNOPSIS" msgstr "" #. type: Plain text #: man-pages/man3/basename.3:33 #, no-wrap msgid "B<#include Elibgen.hE>\n" msgstr "" #. type: Plain text #: man-pages/man3/basename.3:35 #, no-wrap msgid "BIB<);>\n" msgstr "" #. type: Plain text #: man-pages/man3/basename.3:37 #, no-wrap msgid "BIB<);>\n" msgstr "" #. type: SH #: man-pages/man3/basename.3:38 #, no-wrap msgid "DESCRIPTION" msgstr "" #. type: Plain text #: man-pages/man3/basename.3:42 msgid "Warning: there are two different functions B() - see below." msgstr "" #. type: Plain text #: man-pages/man3/basename.3:55 msgid "" "The functions B() and B() break a null-terminated " "pathname string into directory and filename components. In the usual case, " "B() returns the string up to, but not including, the final \\(aq/" "\\(aq, and B() returns the component following the final \\(aq/" "\\(aq. Trailing \\(aq/\\(aq characters are not counted as part of the " "pathname." msgstr "" #. type: Plain text #: man-pages/man3/basename.3:78 msgid "" "If I does not contain a slash, B() returns the string \".\" " "while B() returns a copy of I. If I is the string \"/" "\", then both B() and B() return the string \"/\". If " "I is a null pointer or points to an empty string, then both " "B() and B() return the string \".\"." msgstr "" #. type: Plain text #: man-pages/man3/basename.3:84 msgid "" "Concatenating the string returned by B(), a \"/\", and the string " "returned by B() yields a complete pathname." msgstr "" #. type: Plain text #: man-pages/man3/basename.3:93 msgid "" "Both B() and B() may modify the contents of I, so " "it may be desirable to pass a copy when calling one of these functions." msgstr "" #. type: Plain text #: man-pages/man3/basename.3:102 msgid "" "These functions may return pointers to statically allocated memory which may " "be overwritten by subsequent calls. Alternatively, they may return a " "pointer to some part of I, so that the string referred to by I " "should not be modified or freed until the pointer returned by the function " "is no longer required." msgstr "" #. type: Plain text #: man-pages/man3/basename.3:109 msgid "" "The following list of examples (taken from SUSv2) shows the strings " "returned by B() and B() for different paths:" msgstr "" #. type: tbl table #: man-pages/man3/basename.3:113 #, no-wrap msgid "path dirname basename\n" msgstr "" #. type: tbl table #: man-pages/man3/basename.3:114 #, no-wrap msgid "/usr/lib /usr lib\n" msgstr "" #. type: tbl table #: man-pages/man3/basename.3:115 #, no-wrap msgid "/usr/ / usr\n" msgstr "" #. type: tbl table #: man-pages/man3/basename.3:116 #, no-wrap msgid "usr . usr\n" msgstr "" #. type: tbl table #: man-pages/man3/basename.3:117 #, no-wrap msgid "/ / /\n" msgstr "" #. type: tbl table #: man-pages/man3/basename.3:118 #, no-wrap msgid "\\&. . .\n" msgstr "" #. type: tbl table #: man-pages/man3/basename.3:119 #, no-wrap msgid "\\&.. . ..\n" msgstr "" #. type: SH #: man-pages/man3/basename.3:121 #, no-wrap msgid "RETURN VALUE" msgstr "" #. type: Plain text #: man-pages/man3/basename.3:129 msgid "" "Both B() and B() return pointers to null-terminated " "strings. (Do not pass these pointers to B(3).)" msgstr "" #. type: SH #: man-pages/man3/basename.3:129 #, no-wrap msgid "ATTRIBUTES" msgstr "" #. type: SS #: man-pages/man3/basename.3:130 #, no-wrap msgid "Multithreading (see pthreads(7))" msgstr "" #. type: Plain text #: man-pages/man3/basename.3:136 msgid "The B() and B() functions are thread-safe." msgstr "" #. type: SH #: man-pages/man3/basename.3:136 #, no-wrap msgid "CONFORMING TO" msgstr "" #. type: Plain text #: man-pages/man3/basename.3:138 msgid "POSIX.1-2001." msgstr "" #. type: SH #: man-pages/man3/basename.3:138 #, no-wrap msgid "NOTES" msgstr "" #. type: Plain text #: man-pages/man3/basename.3:143 msgid "" "There are two different versions of B() - the POSIX version " "described above, and the GNU version, which one gets after" msgstr "" #. type: Plain text #: man-pages/man3/basename.3:147 #, no-wrap msgid "B< #define _GNU_SOURCE> /* See feature_test_macros(7) */\n" msgstr "" #. type: Plain text #: man-pages/man3/basename.3:149 #, no-wrap msgid "B<#include Estring.hE>\n" msgstr "" #. type: Plain text #: man-pages/man3/basename.3:157 msgid "" "The GNU version never modifies its argument, and returns the empty string " "when I has a trailing slash, and in particular also when it is \"/\". " "There is no GNU version of B()." msgstr "" #. type: Plain text #: man-pages/man3/basename.3:163 msgid "" "With glibc, one gets the POSIX version of B() when Ilibgen." "hE> is included, and the GNU version otherwise." msgstr "" #. type: SH #: man-pages/man3/basename.3:163 #, no-wrap msgid "BUGS" msgstr "" #. type: Plain text #: man-pages/man3/basename.3:171 msgid "" "In the glibc implementation of the POSIX versions of these functions they " "modify their argument, and segfault when called with a static string like \"/" "usr/\". Before glibc 2.2.1, the glibc version of B() did not " "correctly handle pathnames with trailing \\(aq/\\(aq characters, and " "generated a segfault if given a NULL argument." msgstr "" #. type: SH #: man-pages/man3/basename.3:171 #, no-wrap msgid "EXAMPLE" msgstr "" #. type: Plain text #: man-pages/man3/basename.3:176 #, no-wrap msgid "char *dirc, *basec, *bname, *dname;\n" "char *path = \"/etc/passwd\";\n" msgstr "" #. type: Plain text #: man-pages/man3/basename.3:182 #, no-wrap msgid "" "dirc = strdup(path);\n" "basec = strdup(path);\n" "dname = dirname(dirc);\n" "bname = basename(basec);\n" "printf(\"dirname=%s, basename=%s\\en\", dname, bname);\n" msgstr "" #. type: SH #: man-pages/man3/basename.3:184 #, no-wrap msgid "SEE ALSO" msgstr "" #. type: Plain text #: man-pages/man3/basename.3:187 msgid "B(1), B(1)" msgstr "" #. type: SH #: man-pages/man3/basename.3:187 #, no-wrap msgid "COLOPHON" msgstr "" #. type: Plain text #: man-pages/man3/basename.3:195 msgid "" "This page is part of release 3.70 of the Linux I project. A " "description of the project, information about reporting bugs, and the latest " "version of this page, can be found at \\%http://www.kernel.org/doc/man-pages/" "." msgstr ""