diff options
author | Adam Tkac <atkac@redhat.com> | 2009-09-04 10:57:20 +0000 |
---|---|---|
committer | Adam Tkac <atkac@redhat.com> | 2009-09-04 10:57:20 +0000 |
commit | d36b626bbb7b90306d3d93a5b82fd117fe8ec15f (patch) | |
tree | a535fbe60d92182b93c8a5f3a1f4e5d811c3a8a8 /unix | |
parent | 97abe8a548ff9ca940d568128b21813b8a253872 (diff) | |
download | tigervnc-d36b626bbb7b90306d3d93a5b82fd117fe8ec15f.tar.gz tigervnc-d36b626bbb7b90306d3d93a5b82fd117fe8ec15f.zip |
Revert previous commit (r3889). Windows code has to be cleaned before this
change.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3890 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tx/TXButton.h | 2 | ||||
-rw-r--r-- | unix/tx/TXLabel.h | 2 | ||||
-rw-r--r-- | unix/tx/TXMenu.cxx | 2 | ||||
-rw-r--r-- | unix/tx/TXWindow.cxx | 2 | ||||
-rw-r--r-- | unix/vncviewer/CConn.cxx | 4 | ||||
-rw-r--r-- | unix/vncviewer/vncviewer.cxx | 2 | ||||
-rw-r--r-- | unix/x0vncserver/x0vncserver.cxx | 2 | ||||
-rw-r--r-- | unix/xserver/hw/vnc/XserverDesktop.cc | 10 |
8 files changed, 13 insertions, 13 deletions
diff --git a/unix/tx/TXButton.h b/unix/tx/TXButton.h index 59a84303..b7472797 100644 --- a/unix/tx/TXButton.h +++ b/unix/tx/TXButton.h @@ -59,7 +59,7 @@ public: // setText() changes the text in the button. void setText(const char* text_) { - text.buf = safe_strdup(text_); + text.buf = rfb::strDup(text_); int textWidth = XTextWidth(defaultFS, text.buf, strlen(text.buf)); int textHeight = (defaultFS->ascent + defaultFS->descent); int newWidth = __rfbmax(width(), textWidth + xPad*2 + bevel*2); diff --git a/unix/tx/TXLabel.h b/unix/tx/TXLabel.h index ebb8403c..3d5200d6 100644 --- a/unix/tx/TXLabel.h +++ b/unix/tx/TXLabel.h @@ -47,7 +47,7 @@ public: // setText() changes the text in the label. void setText(const char* text_) { - text.buf = safe_strdup(text_); + text.buf = rfb::strDup(text_); lines = 0; int lineStart = 0; int textWidth = 0; diff --git a/unix/tx/TXMenu.cxx b/unix/tx/TXMenu.cxx index df57daf8..92712f55 100644 --- a/unix/tx/TXMenu.cxx +++ b/unix/tx/TXMenu.cxx @@ -56,7 +56,7 @@ inline int TXMenu::entryHeight(int i) void TXMenu::addEntry(const char* text_, long id_) { assert(nEntries < maxEntries); - text[nEntries] = safe_strdup(text_); + text[nEntries] = rfb::strDup(text_); checked[nEntries] = false; id[nEntries++] = id_; int tw = 0; diff --git a/unix/tx/TXWindow.cxx b/unix/tx/TXWindow.cxx index 1b695e5b..2b535df8 100644 --- a/unix/tx/TXWindow.cxx +++ b/unix/tx/TXWindow.cxx @@ -93,7 +93,7 @@ void TXWindow::init(Display* dpy, const char* defaultWindowClass_) static char tickBits[] = { 0x80, 0xc0, 0xe2, 0x76, 0x3e, 0x1c, 0x08, 0x00}; tick = XCreateBitmapFromData(dpy, DefaultRootWindow(dpy), tickBits, tickSize, tickSize); - defaultWindowClass = safe_strdup(defaultWindowClass_); + defaultWindowClass = rfb::strDup(defaultWindowClass_); } void TXWindow::handleXEvents(Display* dpy) diff --git a/unix/vncviewer/CConn.cxx b/unix/vncviewer/CConn.cxx index efc3c335..8231f4c6 100644 --- a/unix/vncviewer/CConn.cxx +++ b/unix/vncviewer/CConn.cxx @@ -221,8 +221,8 @@ void CConn::getUserPasswd(char** user, char** password) PasswdDialog dlg(dpy, title.buf, !user); if (!dlg.show()) throw rfb::Exception("Authentication cancelled"); if (user) - *user = safe_strdup(dlg.userEntry.getText()); - *password = safe_strdup(dlg.passwdEntry.getText()); + *user = strDup(dlg.userEntry.getText()); + *password = strDup(dlg.passwdEntry.getText()); } diff --git a/unix/vncviewer/vncviewer.cxx b/unix/vncviewer/vncviewer.cxx index 203df9a9..4a47788e 100644 --- a/unix/vncviewer/vncviewer.cxx +++ b/unix/vncviewer/vncviewer.cxx @@ -218,7 +218,7 @@ interpretViaParam (char **gatewayHost, char **remoteHost, if (**vncServerName != '\0') *remoteHost = *vncServerName; - *gatewayHost = safe_strdup (via.getValueStr ()); + *gatewayHost = strDup (via.getValueStr ()); *vncServerName = new char[50]; sprintf (*vncServerName, "localhost::%d", localPort); } diff --git a/unix/x0vncserver/x0vncserver.cxx b/unix/x0vncserver/x0vncserver.cxx index 3e555ce2..ec2fd764 100644 --- a/unix/x0vncserver/x0vncserver.cxx +++ b/unix/x0vncserver/x0vncserver.cxx @@ -101,7 +101,7 @@ public: const char* userName, char** reason) { if (queryConnectSock) { - *reason = safe_strdup("Another connection is currently being queried."); + *reason = strDup("Another connection is currently being queried."); return VNCServerST::REJECT; } if (!userName) userName = "(anonymous)"; diff --git a/unix/xserver/hw/vnc/XserverDesktop.cc b/unix/xserver/hw/vnc/XserverDesktop.cc index e8e49494..66c92d29 100644 --- a/unix/xserver/hw/vnc/XserverDesktop.cc +++ b/unix/xserver/hw/vnc/XserverDesktop.cc @@ -219,7 +219,7 @@ void XserverDesktop::setFramebuffer(int w, int h, void* fbptr, int stride) char* XserverDesktop::substitute(const char* varName) { if (strcmp(varName, "$$") == 0) { - return safe_strdup("$"); + return rfb::strDup("$"); } if (strcmp(varName, "$PORT") == 0) { char* str = new char[10]; @@ -247,7 +247,7 @@ char* XserverDesktop::substitute(const char* varName) return str; } if (strcmp(varName, "$DESKTOP") == 0) { - return safe_strdup(server->getName()); + return rfb::strDup(server->getName()); } if (strcmp(varName, "$DISPLAY") == 0) { struct utsname uts; @@ -260,7 +260,7 @@ char* XserverDesktop::substitute(const char* varName) } if (strcmp(varName, "$USER") == 0) { struct passwd* user = getpwuid(getuid()); - return safe_strdup(user ? user->pw_name : "?"); + return rfb::strDup(user ? user->pw_name : "?"); } return 0; } @@ -270,13 +270,13 @@ XserverDesktop::queryConnection(network::Socket* sock, const char* userName, char** reason) { if (queryConnectId) { - *reason = safe_strdup("Another connection is currently being queried."); + *reason = strDup("Another connection is currently being queried."); return rfb::VNCServerST::REJECT; } queryConnectAddress.replaceBuf(sock->getPeerAddress()); if (!userName) userName = "(anonymous)"; - queryConnectUsername.replaceBuf(safe_strdup(userName)); + queryConnectUsername.replaceBuf(strDup(userName)); queryConnectId = sock; vncQueryConnect(this, sock); return rfb::VNCServerST::PENDING; |