Remove unused method.
authorCarl Hetherington <cth@carlh.net>
Wed, 25 Nov 2020 12:14:44 +0000 (13:14 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 25 Nov 2020 12:14:44 +0000 (13:14 +0100)
src/lib/cross.h
src/lib/cross_linux.cc
src/lib/cross_osx.cc
src/lib/cross_windows.cc

index a53e85a2de3560d5a886c1b8834c099e2d459196..8b594177e884df269de5395976ed79e135132714 100644 (file)
@@ -63,7 +63,6 @@ extern void start_player ();
 extern uint64_t thread_id ();
 extern int avio_open_boost (AVIOContext** s, boost::filesystem::path file, int flags);
 extern boost::filesystem::path home_directory ();
-extern std::string command_and_read (std::string cmd);
 extern bool running_32_on_64 ();
 extern void unprivileged ();
 extern boost::filesystem::path config_path ();
index 2d43d38019c7d2697af5fb498b3894be60d7724d..b6241ec1a3f38763b76e19b03aad2df74fac187b 100644 (file)
@@ -268,29 +268,6 @@ home_directory ()
        return getenv("HOME");
 }
 
-string
-command_and_read (string cmd)
-{
-       FILE* pipe = popen (cmd.c_str(), "r");
-       if (!pipe) {
-               throw runtime_error ("popen failed");
-       }
-
-       string result;
-       char buffer[128];
-       try {
-               while (fgets(buffer, sizeof(buffer), pipe)) {
-                       result += buffer;
-               }
-       } catch (...) {
-               pclose (pipe);
-               throw;
-       }
-
-       pclose (pipe);
-       return result;
-}
-
 /** @return true if this process is a 32-bit one running on a 64-bit-capable OS */
 bool
 running_32_on_64 ()
index dcee2a34518dc5648f02ea645b883036f963d4df..29ef283e603a5f48c4cc382d3508978484c2565b 100644 (file)
@@ -260,12 +260,6 @@ home_directory ()
                return getenv("HOME");
 }
 
-string
-command_and_read (string)
-{
-       return "";
-}
-
 /** @return true if this process is a 32-bit one running on a 64-bit-capable OS */
 bool
 running_32_on_64 ()
index 2072ffd4c63ab47ed8cb3fb81e4bccf790eeb64d..2070459deecce751fd00e0b4aaaaae77ba0fb743 100644 (file)
@@ -345,12 +345,6 @@ home_directory ()
        return boost::filesystem::path(getenv("HOMEDRIVE")) / boost::filesystem::path(getenv("HOMEPATH"));
 }
 
-string
-command_and_read (string)
-{
-       return "";
-}
-
 /** @return true if this process is a 32-bit one running on a 64-bit-capable OS */
 bool
 running_32_on_64 ()