Lines Matching defs:leaf

36 /*!	\brief Parses the supplied path and returns the position of the leaf name
40 function always returns a non-empty directory path part. The leaf name
48 the leaf name part shall be written. The index is inclusive.
50 the leaf name part shall be written. The index is exclusive.
63 // find then end of the leaf name (skip trailing '/')
73 // find the start of the leaf name
92 /*! \brief Parses the supplied path and returns the leaf name part of the path
96 function always returns a non-empty directory path part. The leaf name
104 \param leaf Pointer to a character array of size \c B_FILE_NAME_LENGTH
105 or greater, into which the leaf name part shall be written.
111 parse_path(const char *fullPath, char *dirPath, char *leaf)
125 if (leaf)
126 strlcpy(leaf, fullPath + leafStart, leafEnd - leafStart + 1);
155 // reading the leaf name
163 // Read leaf name chars until we hit a '/' char
178 and the leaf name.
182 \param leaf a variable the leaf name pointer shall be
186 split_path(const char *fullPath, char *&path, char *&leaf)
188 return split_path(fullPath, &path, &leaf);
192 and the leaf name.
196 \param leaf a pointer to a variable the leaf name pointer shall be
200 split_path(const char *fullPath, char **path, char **leaf)
204 if (leaf)
205 *leaf = NULL;
225 if (leaf) {
226 *leaf = new char[2];
227 (*leaf)[0] = '.';
228 (*leaf)[1] = 0;
237 if (leaf) {
238 *leaf = new char[2];
239 (*leaf)[0] = '.';
240 (*leaf)[1] = 0;
254 // Alloc new strings and copy the path and leaf over
269 if (leaf) {
271 *leaf = new char[len+1];
272 memcpy(*leaf, fullPath + leafStart, len);
273 (*leaf)[len] = 0;
278 if (leaf)
279 delete[] *leaf;