mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-25 21:46:57 +03:00
Implementing path utility functions.
svn path=/trunk/netsurf/; revision=11841
This commit is contained in:
parent
7e42318684
commit
ff0aa37393
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user