Implementing path utility functions.

svn path=/trunk/netsurf/; revision=11841
This commit is contained in:
Sven Weidauer 2011-02-27 13:21:42 +00:00
parent 7e42318684
commit ff0aa37393

View File

@ -44,14 +44,16 @@ void PDF_Password(char **owner_pass, char **user_pass, char *path)
char *filename_from_path(char *path)
{
UNIMPL();
return NULL;
return strdup( [[[NSString stringWithUTF8String: path] lastPathComponent] UTF8String] );
}
bool path_add_part(char *path, int length, const char *newpart)
{
UNIMPL();
return false;
NSString *newPath = [[NSString stringWithUTF8String: path] stringByAppendingPathComponent: [NSString stringWithUTF8String: newpart]];
strncpy( path, [newPath UTF8String], length );
return true;
}
void tree_icon_name_from_content_type(char *buffer, content_type type)