diff options
author | fluxgen <fluxgen> | 2002-01-08 11:37:15 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2002-01-08 11:37:15 (GMT) |
commit | 66ea6cf7828d437a66e9795c6b02fb238ad467dd (patch) | |
tree | d6e8aae2585d40deaf482ac962c1b6a0a9d46399 /src/Theme.cc | |
parent | 49f3715f0cfcdce8fe67e71157ab1efffb920586 (diff) | |
download | fluxbox-66ea6cf7828d437a66e9795c6b02fb238ad467dd.zip fluxbox-66ea6cf7828d437a66e9795c6b02fb238ad467dd.tar.bz2 |
Moved to std::string from std::strstream
Diffstat (limited to 'src/Theme.cc')
-rw-r--r-- | src/Theme.cc | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/src/Theme.cc b/src/Theme.cc index 4caa734..6eba19e 100644 --- a/src/Theme.cc +++ b/src/Theme.cc | |||
@@ -41,7 +41,7 @@ | |||
41 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 41 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
42 | // DEALINGS IN THE SOFTWARE. | 42 | // DEALINGS IN THE SOFTWARE. |
43 | 43 | ||
44 | // $Id: Theme.cc,v 1.8 2002/01/08 00:12:51 fluxgen Exp $ | 44 | // $Id: Theme.cc,v 1.9 2002/01/08 11:37:15 fluxgen Exp $ |
45 | 45 | ||
46 | #ifndef _GNU_SOURCE | 46 | #ifndef _GNU_SOURCE |
47 | #define _GNU_SOURCE | 47 | #define _GNU_SOURCE |
@@ -66,7 +66,6 @@ | |||
66 | #include <cstdio> | 66 | #include <cstdio> |
67 | #include <cstdarg> | 67 | #include <cstdarg> |
68 | #include <string> | 68 | #include <string> |
69 | #include <strstream> | ||
70 | #include <iostream> | 69 | #include <iostream> |
71 | using namespace std; | 70 | using namespace std; |
72 | 71 | ||
@@ -656,16 +655,16 @@ void Theme::loadRootCommand() { | |||
656 | char *value_type; | 655 | char *value_type; |
657 | 656 | ||
658 | if (m_rootcommand.size()) { | 657 | if (m_rootcommand.size()) { |
659 | #ifndef __EMX__ | 658 | #ifndef __EMX__ |
660 | //const int display_strlen = 1024; | 659 | char tmpstring[256]; //to hold m_screennum |
661 | //char displaystring[display_strlen]; | 660 | tmpstring[0]=0; |
662 | strstream displaystring; | 661 | sprintf(tmpstring, "%d", m_screennum); |
663 | displaystring<<"DISPLAY="<<DisplayString(m_display)<<m_screennum; | 662 | string displaystring("DISPLAY="); |
664 | cerr<<__FILE__<<"("<<__LINE__<<"): displaystring="<<displaystring.str()<<endl; | 663 | displaystring.append(DisplayString(m_display)); |
665 | //snprintf(displaystring, display_strlen, "DISPLAY=%s%d", | 664 | displaystring.append(tmpstring); // append m_screennum |
666 | //DisplayString(m_display), m_screennum); | 665 | cerr<<__FILE__<<"("<<__LINE__<<"): displaystring="<<displaystring.c_str()<<endl; |
667 | 666 | ||
668 | bexec(m_rootcommand.c_str(), displaystring.str()); | 667 | bexec(m_rootcommand.c_str(), const_cast<char *>(displaystring.c_str())); |
669 | #else // __EMX__ | 668 | #else // __EMX__ |
670 | spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", m_rootcommand.c_str(), NULL); | 669 | spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", m_rootcommand.c_str(), NULL); |
671 | #endif // !__EMX__ | 670 | #endif // !__EMX__ |
@@ -677,15 +676,15 @@ void Theme::loadRootCommand() { | |||
677 | } else if (XrmGetResource(m_database, "rootCommand", | 676 | } else if (XrmGetResource(m_database, "rootCommand", |
678 | "RootCommand", &value_type, &value)) { | 677 | "RootCommand", &value_type, &value)) { |
679 | #ifndef __EMX__ | 678 | #ifndef __EMX__ |
680 | //const int display_strlen = 1024; | 679 | char tmpstring[256]; //to hold m_screennum |
681 | //char displaystring[display_strlen]; | 680 | tmpstring[0]=0; |
682 | strstream displaystring; | 681 | sprintf(tmpstring, "%d", m_screennum); |
683 | displaystring<<"DISPLAY="<<DisplayString(m_display)<<m_screennum; | 682 | string displaystring("DISPLAY="); |
684 | cerr<<__FILE__<<"("<<__LINE__<<"): displaystring="<<displaystring.str()<<endl; | 683 | displaystring.append(DisplayString(m_display)); |
685 | //snprintf(displaystring, display_strlen, "DISPLAY=%s%d", | 684 | displaystring.append(tmpstring); // append m_screennum |
686 | // DisplayString(m_display), m_screennum); | 685 | cerr<<__FILE__<<"("<<__LINE__<<"): displaystring="<<displaystring.c_str()<<endl; |
687 | 686 | ||
688 | bexec(value.addr, displaystring.str()); | 687 | bexec(value.addr, const_cast<char *>(displaystring.c_str())); |
689 | #else // __EMX__ | 688 | #else // __EMX__ |
690 | spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", value.addr, NULL); | 689 | spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", value.addr, NULL); |
691 | #endif // !__EMX__ | 690 | #endif // !__EMX__ |