diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-05-03 15:55:36 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-05-08 17:13:22 +0900 |
| commit | 2cab1f3059038ab001f5185c29f0791c77aeeba1 (patch) | |
| tree | e294a699a78e0aef2969216fc8fc1378b83b0064 /ktalkd | |
| parent | b2cb25ce7dde70c48747856d22dfac03f27033e1 (diff) | |
| download | tdenetwork-2cab1f30.tar.gz tdenetwork-2cab1f30.zip | |
Replace TRUE/FALSE with boolean values true/false
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 89969dcb2142d91b295c8d18cde46e22ef118dce)
Diffstat (limited to 'ktalkd')
| -rw-r--r-- | ktalkd/ktalkd/unixsock.cpp | 18 | ||||
| -rw-r--r-- | ktalkd/ktalkdlg/ktalkdlg.cpp | 2 |
2 files changed, 10 insertions, 10 deletions
diff --git a/ktalkd/ktalkd/unixsock.cpp b/ktalkd/ktalkd/unixsock.cpp index 93b939ec..6aefa3f2 100644 --- a/ktalkd/ktalkd/unixsock.cpp +++ b/ktalkd/ktalkd/unixsock.cpp @@ -58,17 +58,17 @@ bool sendToKtalk (const char *username, const char *announce) username: name of the user who shall receive the announce announce: name and IP address of the one who requests the talk - return value: TRUE if at least one ktalk was found and running - FALSE otherwise + return value: true if at least one ktalk was found and running + false otherwise */ { // WABA: Disabled for reasons outlined below by XXX. - return FALSE; + return false; #if 0 // Create a socket int sock; - if ((sock = socket (AF_UNIX, SOCK_DGRAM, 0)) < 0) return FALSE; + if ((sock = socket (AF_UNIX, SOCK_DGRAM, 0)) < 0) return false; // Bind it to a temporary file in /tmp struct sockaddr_un tempAddr; tempAddr.sun_family = AF_UNIX; @@ -76,13 +76,13 @@ bool sendToKtalk (const char *username, const char *announce) bind (sock, (struct sockaddr *) &tempAddr, sizeof (tempAddr)) == -1) { close (sock); debug("Couldn't create temporary socket!"); - return FALSE; + return false; } // find sockets of running ktalk clients TQString tempDir = "/tmp"; TQString templ = TQString ("ktalk-") + username + "-"; - bool announceok = FALSE; + bool announceok = false; char buffer [N_CHARS+2]; buffer [0] = 1; strcpy (buffer + 1, announce); // announce is at most N_CHARS long. @@ -115,17 +115,17 @@ bool sendToKtalk (const char *username, const char *announce) len = sendto (sock, buffer, announcelen, 0, (struct sockaddr *) &ktalkAddr, sizeof (ktalkAddr)); if (len == announcelen) - announceok = TRUE; + announceok = true; } } closedir (dir); if (!announceok) { close (sock); unlink (tempAddr.sun_path); - return FALSE; + return false; } // at least one accepted the packet, wait for response : - bool result = FALSE; + bool result = false; fd_set readFDs; FD_ZERO (&readFDs); FD_SET (sock, &readFDs); diff --git a/ktalkd/ktalkdlg/ktalkdlg.cpp b/ktalkd/ktalkdlg/ktalkdlg.cpp index a4904638..e9d40c3f 100644 --- a/ktalkd/ktalkdlg/ktalkdlg.cpp +++ b/ktalkd/ktalkdlg/ktalkdlg.cpp @@ -47,7 +47,7 @@ class TimeoutDialog : public TQMessageBox { TimeoutDialog (int timeout_ms, const TQString& caption, const TQString &text, Icon icon, int button0, int button1, int button2, - TQWidget *parent=0, const char *name=0, bool modal=TRUE, + TQWidget *parent=0, const char *name=0, bool modal=true, WFlags f=WStyle_DialogBorder ): TQMessageBox (caption, text, icon, button0, button1, button2, parent, name, modal, f) |
