aboutsummaryrefslogtreecommitdiffhomepage
path: root/wutil.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2011-12-26 19:18:46 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2011-12-26 19:18:46 -0800
commit8d2f107d61a8b0e099ab9a59b8a32c236da5a5fc (patch)
tree89f718ab74f8400332534aee237c6f925348f05c /wutil.h
parent3f16ace6784caab54fb054836ee93902e9701913 (diff)
Some changes to migrate towards C++ and a multithreaded model
Diffstat (limited to 'wutil.h')
-rw-r--r--wutil.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/wutil.h b/wutil.h
index 16f16d80..c043829b 100644
--- a/wutil.h
+++ b/wutil.h
@@ -1,7 +1,7 @@
/** \file wutil.h
Prototypes for wide character equivalents of various standard unix
- functions.
+ functions.
*/
#ifndef FISH_WUTIL_H
#define FISH_WUTIL_H
@@ -14,6 +14,9 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <stdarg.h>
+#include <string>
+
+
/**
Wide version of the dirent data structure
@@ -24,8 +27,7 @@ struct wdirent
The name of the current directory
*/
wchar_t *d_name;
-}
- ;
+};
/**
@@ -95,7 +97,7 @@ wchar_t *wgetcwd( wchar_t *buff, size_t sz );
*/
int wchdir( const wchar_t * dir );
-/**
+/**
Wide character version of realpath function. Just like the GNU
version of realpath, wrealpath will accept 0 as the value for the
second argument, in which case the result will be allocated using
@@ -106,17 +108,17 @@ wchar_t *wrealpath(const wchar_t *pathname, wchar_t *resolved_path);
/**
Wide character version of readdir()
*/
-struct wdirent *wreaddir(DIR *dir );
+std::wstring *wreaddir(DIR *dir, std::wstring &outPath);
/**
Wide character version of dirname()
*/
-wchar_t *wdirname( wchar_t *path );
+std::wstring wdirname( const std::wstring &path);
/**
Wide character version of basename()
*/
-wchar_t *wbasename( const wchar_t *path );
+std::wstring wbasename( const std::wstring &path);
/**
Wide character wrapper around the gettext function. For historic
@@ -141,6 +143,6 @@ int wmkdir( const wchar_t *dir, int mode );
/**
Wide character version of rename
*/
-int wrename( const wchar_t *old, const wchar_t *new );
+int wrename( const wchar_t *oldName, const wchar_t *newName );
#endif