aboutsummaryrefslogtreecommitdiffhomepage
path: root/wutil.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-10-31 01:15:50 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-10-31 01:15:50 -0700
commit7ac593273e25d5ce39104dc1752660a43a29f61d (patch)
tree1f0a18a2f49a61460ff8d7c1c3de375af37395d4 /wutil.cpp
parenta529fc9d83295fdf9418436b68d056162ba8231b (diff)
Remove a bunch of dead code identified by cppcheck
Diffstat (limited to 'wutil.cpp')
-rw-r--r--wutil.cpp35
1 files changed, 0 insertions, 35 deletions
diff --git a/wutil.cpp b/wutil.cpp
index 25c0cec0..90313198 100644
--- a/wutil.cpp
+++ b/wutil.cpp
@@ -188,12 +188,6 @@ FILE *wfopen(const wcstring &path, const char *mode)
return result;
}
-FILE *wfreopen(const wcstring &path, const char *mode, FILE *stream)
-{
- cstring tmp = wcs2string(path);
- return freopen(tmp.c_str(), mode, stream);
-}
-
bool set_cloexec(int fd)
{
int flags = fcntl(fd, F_GETFD, 0);
@@ -232,26 +226,12 @@ static int wopen_internal(const wcstring &pathname, int flags, mode_t mode, bool
return fd;
}
-int wopen(const wcstring &pathname, int flags, mode_t mode)
-{
- // off the main thread, always use wopen_cloexec
- ASSERT_IS_MAIN_THREAD();
- ASSERT_IS_NOT_FORKED_CHILD();
- return wopen_internal(pathname, flags, mode, false);
-}
int wopen_cloexec(const wcstring &pathname, int flags, mode_t mode)
{
return wopen_internal(pathname, flags, mode, true);
}
-
-int wcreat(const wcstring &pathname, mode_t mode)
-{
- const cstring tmp = wcs2string(pathname);
- return creat(tmp.c_str(), mode);
-}
-
DIR *wopendir(const wcstring &name)
{
const cstring tmp = wcs2string(name);
@@ -488,21 +468,6 @@ const wchar_t *wgettext(const wchar_t *in)
return val->c_str(); //looks dangerous but is safe, since the string is stored in the map
}
-const wchar_t *wgetenv(const wcstring &name)
-{
- ASSERT_IS_MAIN_THREAD();
- cstring name_narrow = wcs2string(name);
- char *res_narrow = getenv(name_narrow.c_str());
- static wcstring out;
-
- if (!res_narrow)
- return 0;
-
- out = format_string(L"%s", res_narrow);
- return out.c_str();
-
-}
-
int wmkdir(const wcstring &name, int mode)
{
cstring name_narrow = wcs2string(name);