summaryrefslogtreecommitdiffstats
path: root/ktalkd
diff options
context:
space:
mode:
Diffstat (limited to 'ktalkd')
-rw-r--r--ktalkd/kcmktalkd/answmachpage.cpp18
-rw-r--r--ktalkd/kcmktalkd/answmachpage.h5
-rw-r--r--ktalkd/kcmktalkd/forwmachpage.cpp12
-rw-r--r--ktalkd/kcmktalkd/forwmachpage.h5
-rw-r--r--ktalkd/kcmktalkd/main.cpp24
-rw-r--r--ktalkd/kcmktalkd/main.h3
-rw-r--r--ktalkd/kcmktalkd/soundpage.cpp14
-rw-r--r--ktalkd/kcmktalkd/soundpage.h5
-rw-r--r--ktalkd/ktalkd/announce.cpp8
-rw-r--r--ktalkd/ktalkd/defs.h14
-rw-r--r--ktalkd/ktalkd/machines/answmach.cpp8
-rw-r--r--ktalkd/ktalkd/machines/forwmach.cpp16
-rw-r--r--ktalkd/ktalkd/machines/talkconn.cpp30
-rw-r--r--ktalkd/ktalkd/process.cpp32
-rw-r--r--ktalkd/ktalkd/proto.h4
-rw-r--r--ktalkd/ktalkd/readcfg++.cpp4
-rw-r--r--ktalkd/ktalkd/repairs.c32
-rw-r--r--ktalkd/ktalkd/talkd.cpp6
-rw-r--r--ktalkd/ktalkd/threads.cpp4
-rw-r--r--ktalkd/ktalkd/threads.h4
-rw-r--r--ktalkd/ktalkd/unixsock.cpp2
-rw-r--r--ktalkd/ktalkdlg/ktalkdlg.cpp14
-rw-r--r--ktalkd/mail.local/mail.local.c4
23 files changed, 136 insertions, 132 deletions
diff --git a/ktalkd/kcmktalkd/answmachpage.cpp b/ktalkd/kcmktalkd/answmachpage.cpp
index 3f426821..19e02f60 100644
--- a/ktalkd/kcmktalkd/answmachpage.cpp
+++ b/ktalkd/kcmktalkd/answmachpage.cpp
@@ -3,7 +3,7 @@
*
* Copyright (C) 1998 David Faure, faure@kde.org
*
- * Requires the Qt widget libraries, available at no cost at
+ * Requires the TQt widget libraries, available at no cost at
* http://www.troll.no/
*
* This program is free software; you can redistribute it and/or modify
@@ -29,9 +29,9 @@
#include <stdlib.h>
#include <klocale.h> // for getenv
-KAnswmachPageConfig::KAnswmachPageConfig( TQWidget *parent, const char* name,
+KAnswmachPageConfig::KAnswmachPageConfig( TQWidget *tqparent, const char* name,
KSimpleConfig *_config)
- : KCModule (parent, name)
+ : KCModule (tqparent, name)
{
if (!_config) {
delete_config = true;
@@ -49,27 +49,27 @@ KAnswmachPageConfig::KAnswmachPageConfig( TQWidget *parent, const char* name,
mail_edit->setMinimumWidth(150);
mail_label = new TQLabel(mail_edit,i18n("&Mail address:"),this);
mail_label->adjustSize();
- mail_label->setAlignment( ShowPrefix | AlignVCenter );
+ mail_label->tqsetAlignment( ShowPrefix | AlignVCenter );
subj_edit = new TQLineEdit(this);
subj_edit->adjustSize();
subj_edit->setMinimumWidth(150);
subj_label = new TQLabel(subj_edit, i18n("Mail s&ubject:"),this);
subj_label->adjustSize();
- subj_label->setAlignment( ShowPrefix | AlignVCenter );
+ subj_label->tqsetAlignment( ShowPrefix | AlignVCenter );
subj_tip = new TQLabel(i18n("Use %s for the caller name"),this);
- subj_tip->setAlignment( ShowPrefix );
+ subj_tip->tqsetAlignment( ShowPrefix );
head_edit = new TQLineEdit(this);
head_edit->adjustSize();
head_edit->setMinimumWidth(150);
head_label = new TQLabel(head_edit, i18n("Mail &first line:"),this);
head_label->adjustSize();
- head_label->setAlignment( ShowPrefix | AlignVCenter );
+ head_label->tqsetAlignment( ShowPrefix | AlignVCenter );
head_tip = new TQLabel(
i18n("Use first %s for caller name, and second %s for caller hostname"),
this);
- head_tip->setAlignment( ShowPrefix );
+ head_tip->tqsetAlignment( ShowPrefix );
emptymail_cb = new TQCheckBox(i18n("&Receive a mail even if no message left"), this);
emptymail_cb->adjustSize();
@@ -79,7 +79,7 @@ KAnswmachPageConfig::KAnswmachPageConfig( TQWidget *parent, const char* name,
msg_ml->setMinimumWidth(150);
msg_label = new TQLabel(msg_ml, i18n("&Banner displayed on answering machine startup:"),this);
msg_label->adjustSize();
- msg_label->setAlignment( ShowPrefix | AlignVCenter );
+ msg_label->tqsetAlignment( ShowPrefix | AlignVCenter );
int h = 10 + answmach_cb->height() + mail_edit->height() +
subj_edit->height() + subj_tip->height() + head_edit->height()
diff --git a/ktalkd/kcmktalkd/answmachpage.h b/ktalkd/kcmktalkd/answmachpage.h
index 31032a93..7a5f0cd4 100644
--- a/ktalkd/kcmktalkd/answmachpage.h
+++ b/ktalkd/kcmktalkd/answmachpage.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 1998 David Faure
*
- * Requires the Qt widget libraries, available at no cost at
+ * Requires the TQt widget libraries, available at no cost at
* http://www.troll.no/
*
* This program is free software; you can redistribute it and/or modify
@@ -42,9 +42,10 @@ class KSimpleConfig;
class KAnswmachPageConfig : public KCModule
{
Q_OBJECT
+ TQ_OBJECT
public:
- KAnswmachPageConfig( TQWidget *parent=0, const char* name=0,
+ KAnswmachPageConfig( TQWidget *tqparent=0, const char* name=0,
KSimpleConfig *config=0 );
~KAnswmachPageConfig( );
diff --git a/ktalkd/kcmktalkd/forwmachpage.cpp b/ktalkd/kcmktalkd/forwmachpage.cpp
index 0a6337f7..fb04bf7f 100644
--- a/ktalkd/kcmktalkd/forwmachpage.cpp
+++ b/ktalkd/kcmktalkd/forwmachpage.cpp
@@ -3,7 +3,7 @@
*
* Copyright (C) 1998 David Faure, faure@kde.org
*
- * Requires the Qt widget libraries, available at no cost at
+ * Requires the TQt widget libraries, available at no cost at
* http://www.troll.no/
*
* This program is free software; you can redistribute it and/or modify
@@ -26,9 +26,9 @@
#include <ksimpleconfig.h>
#include <klocale.h>
-KForwmachPageConfig::KForwmachPageConfig( TQWidget *parent, const char* name,
+KForwmachPageConfig::KForwmachPageConfig( TQWidget *tqparent, const char* name,
KSimpleConfig *_config)
- : KCModule (parent, name)
+ : KCModule (tqparent, name)
{
if (!_config) {
delete_config = true;
@@ -45,7 +45,7 @@ KForwmachPageConfig::KForwmachPageConfig( TQWidget *parent, const char* name,
address_edit->setMinimumWidth(150);
address_label = new TQLabel(address_edit,i18n("&Destination (user or user@host):"),this);
address_label->adjustSize();
- address_label->setAlignment( ShowPrefix | AlignVCenter );
+ address_label->tqsetAlignment( ShowPrefix | AlignVCenter );
method_combo = new TQComboBox(this);
method_combo->insertItem("FWA");
@@ -55,7 +55,7 @@ KForwmachPageConfig::KForwmachPageConfig( TQWidget *parent, const char* name,
method_combo->setMinimumWidth(80);
method_label = new TQLabel(method_combo, i18n("Forward &method:"),this);
method_label->adjustSize();
- method_label->setAlignment( ShowPrefix | AlignVCenter );
+ method_label->tqsetAlignment( ShowPrefix | AlignVCenter );
expl_label = new TQLabel(i18n(
"FWA: Forward announcement only. Direct connection. Not recommended.\n\
@@ -87,7 +87,7 @@ KForwmachPageConfig::~KForwmachPageConfig( ) {
if (delete_config) delete config;
/* I've been told that this is not necessary as
- they will be deleted by Qt. But, well... */
+ they will be deleted by TQt. But, well... */
delete forwmach_cb;
delete address_label;
delete address_edit;
diff --git a/ktalkd/kcmktalkd/forwmachpage.h b/ktalkd/kcmktalkd/forwmachpage.h
index 1643aeef..7811eb71 100644
--- a/ktalkd/kcmktalkd/forwmachpage.h
+++ b/ktalkd/kcmktalkd/forwmachpage.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 1998 David Faure
*
- * Requires the Qt widget libraries, available at no cost at
+ * Requires the TQt widget libraries, available at no cost at
* http://www.troll.no/
*
* This program is free software; you can redistribute it and/or modify
@@ -42,9 +42,10 @@ class KSimpleConfig;
class KForwmachPageConfig : public KCModule
{
Q_OBJECT
+ TQ_OBJECT
public:
- KForwmachPageConfig( TQWidget *parent=0, const char* name=0,
+ KForwmachPageConfig( TQWidget *tqparent=0, const char* name=0,
KSimpleConfig *config=0);
~KForwmachPageConfig( );
diff --git a/ktalkd/kcmktalkd/main.cpp b/ktalkd/kcmktalkd/main.cpp
index 06f1e9b8..a1ff8878 100644
--- a/ktalkd/kcmktalkd/main.cpp
+++ b/ktalkd/kcmktalkd/main.cpp
@@ -30,17 +30,17 @@
#include <tqtabwidget.h>
#include <tqlayout.h>
-KTalkdConfigModule::KTalkdConfigModule(TQWidget *parent, const char *name)
- : KCModule(parent, name)
+KTalkdConfigModule::KTalkdConfigModule(TQWidget *tqparent, const char *name)
+ : KCModule(tqparent, name)
{
config = new KSimpleConfig("ktalkdrc");
announceconfig = new KSimpleConfig("ktalkannouncerc");
- TQVBoxLayout *layout = new TQVBoxLayout(this);
+ TQVBoxLayout *tqlayout = new TQVBoxLayout(this);
tab = new TQTabWidget(this);
- layout->addWidget(tab);
+ tqlayout->addWidget(tab);
soundpage = new KSoundPageConfig(this, "soundpage", config, announceconfig);
answmachpage = new KAnswmachPageConfig(this, "answmachpage", config);
@@ -88,24 +88,24 @@ void KTalkdConfigModule::resizeEvent(TQResizeEvent *)
extern "C"
{
- KDE_EXPORT KCModule *create_ktalkd(TQWidget *parent, const char *)
+ KDE_EXPORT KCModule *create_ktalkd(TQWidget *tqparent, const char *)
{
- return new KTalkdConfigModule(parent, "kcmktalkd");
+ return new KTalkdConfigModule(tqparent, "kcmktalkd");
}
- KDE_EXPORT KCModule *create_ktalkd_answmach(TQWidget *parent, const char *)
+ KDE_EXPORT KCModule *create_ktalkd_answmach(TQWidget *tqparent, const char *)
{
- return new KAnswmachPageConfig(parent, "kcmktalkd");
+ return new KAnswmachPageConfig(tqparent, "kcmktalkd");
}
- KDE_EXPORT KCModule *create_ktalkd_sound(TQWidget *parent, const char *)
+ KDE_EXPORT KCModule *create_ktalkd_sound(TQWidget *tqparent, const char *)
{
- return new KSoundPageConfig(parent, "kcmktalkd");
+ return new KSoundPageConfig(tqparent, "kcmktalkd");
}
- KDE_EXPORT KCModule *create_ktalkd_forwmach(TQWidget *parent, const char *)
+ KDE_EXPORT KCModule *create_ktalkd_forwmach(TQWidget *tqparent, const char *)
{
- return new KForwmachPageConfig(parent, "kcmktalkd");
+ return new KForwmachPageConfig(tqparent, "kcmktalkd");
}
}
diff --git a/ktalkd/kcmktalkd/main.h b/ktalkd/kcmktalkd/main.h
index 088c9594..1fb1c910 100644
--- a/ktalkd/kcmktalkd/main.h
+++ b/ktalkd/kcmktalkd/main.h
@@ -35,10 +35,11 @@ class KForwmachPageConfig;
class KTalkdConfigModule : public KCModule
{
Q_OBJECT
+ TQ_OBJECT
public:
- KTalkdConfigModule(TQWidget *parent, const char *name);
+ KTalkdConfigModule(TQWidget *tqparent, const char *name);
virtual ~KTalkdConfigModule();
//void init();
diff --git a/ktalkd/kcmktalkd/soundpage.cpp b/ktalkd/kcmktalkd/soundpage.cpp
index 289b180f..8e812a58 100644
--- a/ktalkd/kcmktalkd/soundpage.cpp
+++ b/ktalkd/kcmktalkd/soundpage.cpp
@@ -3,7 +3,7 @@
*
* Copyright (C) 1998 David Faure, faure@kde.org
*
- * Requires the Qt widget libraries, available at no cost at
+ * Requires the TQt widget libraries, available at no cost at
* http://www.troll.no/
*
* This program is free software; you can redistribute it and/or modify
@@ -44,9 +44,9 @@
/* Lots of stuff taken from syssound.cpp */
-KSoundPageConfig::KSoundPageConfig( TQWidget *parent, const char* name,
+KSoundPageConfig::KSoundPageConfig( TQWidget *tqparent, const char* name,
KSimpleConfig *_config, KSimpleConfig *_announceconfig)
- : KCModule (parent, name)
+ : KCModule (tqparent, name)
{
if (!_config) {
delete_config = true;
@@ -66,7 +66,7 @@ KSoundPageConfig::KSoundPageConfig( TQWidget *parent, const char* name,
extprg_box->setColumnLayout( 0, Qt::Horizontal );
toplay->addWidget(extprg_box);
- TQGridLayout* l = new TQGridLayout(extprg_box->layout());
+ TQGridLayout* l = new TQGridLayout(extprg_box->tqlayout());
extprg_edit = new KURLRequester(extprg_box);
l->addWidget(extprg_edit, 2, 4);
@@ -90,7 +90,7 @@ KSoundPageConfig::KSoundPageConfig( TQWidget *parent, const char* name,
TQBoxLayout* lay = new TQVBoxLayout(sound_box, 10, 10);
- int edit_h = client_edit->height(); // The height of a QLineEdit
+ int edit_h = client_edit->height(); // The height of a TQLineEdit
sound_list = new TQListBox(sound_box);
sound_list->setMinimumHeight( 3 * edit_h );
@@ -193,7 +193,7 @@ void KSoundPageConfig::sound_listDropEvent(TQDropEvent* e){
if (url.path().right(4).upper() != ".WAV") {
TQString msg = i18n("%1\ndoes not appear "\
- "to be a WAV file.").arg(url.path());
+ "to be a WAV file.").tqarg(url.path());
KMessageBox::sorry(this, msg, i18n("Improper File Extension"));
@@ -203,7 +203,7 @@ void KSoundPageConfig::sound_listDropEvent(TQDropEvent* e){
if (!addToSound_List(url.path())) {
// did not add file because it is already in the list
- TQString msg = i18n("The file %1 is already in the list").arg(url.path());
+ TQString msg = i18n("The file %1 is already in the list").tqarg(url.path());
KMessageBox::information(this, msg, i18n("File Already in List"));
diff --git a/ktalkd/kcmktalkd/soundpage.h b/ktalkd/kcmktalkd/soundpage.h
index 256df41b..2c19ee66 100644
--- a/ktalkd/kcmktalkd/soundpage.h
+++ b/ktalkd/kcmktalkd/soundpage.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 1998 David Faure
*
- * Requires the Qt widget libraries, available at no cost at
+ * Requires the TQt widget libraries, available at no cost at
* http://www.troll.no/
*
* This program is free software; you can redistribute it and/or modify
@@ -46,9 +46,10 @@ class TQPushButton;
class KSoundPageConfig : public KCModule
{
Q_OBJECT
+ TQ_OBJECT
public:
- KSoundPageConfig( TQWidget *parent=0, const char* name=0,
+ KSoundPageConfig( TQWidget *tqparent=0, const char* name=0,
KSimpleConfig *config=0, KSimpleConfig *announceconfig=0);
~KSoundPageConfig( );
diff --git a/ktalkd/ktalkd/announce.cpp b/ktalkd/ktalkd/announce.cpp
index d21f27f4..51f878e0 100644
--- a/ktalkd/ktalkd/announce.cpp
+++ b/ktalkd/ktalkd/announce.cpp
@@ -93,11 +93,11 @@ int announce(NEW_CTL_MSG *request, const char *remote_machine, char *disp, int
request->r_name);
} else if (strstr(request->l_name,"\033")) {
syslog(LOG_WARNING,
- "blocked VT100 FLASH BOMB to user: %s (apparently from: %s)",
+ "blocked VT100 FLASH BOMB to user: %s (aptqparently from: %s)",
request->r_name, remote_machine);
} else {
if ((pid = fork())) {
- /* we are the parent, so wait for the child */
+ /* we are the tqparent, so wait for the child */
if (pid == -1) /* the fork failed */
return (FAILED);
status = wait_process(pid);
@@ -242,7 +242,7 @@ int try_Xannounce(NEW_CTL_MSG *request, const char *remote_machine,
new_process();
/*
* I don't know any way how to find that external program run ok
- * so parent returns always SUCCESS
+ * so tqparent returns always SUCCESS
* Well I know a solution - read the pipe :-) - It blocks, so
* we can't wait the reaction of the user
*
@@ -451,7 +451,7 @@ int play_sound(int usercfg)
ktalk_debug(sSoundFile);
if ((pid = fork())) {
- /* we are the parent, so wait for the child */
+ /* we are the tqparent, so wait for the child */
if (pid == -1) /* the fork failed */
{
syslog(LOG_ERR,"Fork before play_sound : FAILED.");
diff --git a/ktalkd/ktalkd/defs.h b/ktalkd/ktalkd/defs.h
index de4a96a9..a8de9ad3 100644
--- a/ktalkd/ktalkd/defs.h
+++ b/ktalkd/ktalkd/defs.h
@@ -72,15 +72,15 @@ Please leave a message and quit normally when finished.\n"
#define NEU_BANNER3 "or leave a message which will be sent to the system administrator."
/* return value from process_request : */
-#define PROC_REQ_OK 0
-#define PROC_REQ_ERR 1
-#define PROC_REQ_FORWMACH 2
-#define PROC_REQ_ANSWMACH 3
-#define PROC_REQ_ANSWMACH_NOT_LOGGED 4
-#define PROC_REQ_ANSWMACH_NOT_HERE 5
+#define PROC_RETQ_OK 0
+#define PROC_RETQ_ERR 1
+#define PROC_RETQ_FORWMACH 2
+#define PROC_RETQ_ANSWMACH 3
+#define PROC_RETQ_ANSWMACH_NOT_LOGGED 4
+#define PROC_RETQ_ANSWMACH_NOT_HERE 5
/* Min value to launch answer machine : */
-#define PROC_REQ_MIN_A 3
+#define PROC_RETQ_MIN_A 3
#include "options.h"
diff --git a/ktalkd/ktalkd/machines/answmach.cpp b/ktalkd/ktalkd/machines/answmach.cpp
index 0e36c3e2..9dfaba19 100644
--- a/ktalkd/ktalkd/machines/answmach.cpp
+++ b/ktalkd/ktalkd/machines/answmach.cpp
@@ -77,7 +77,7 @@ AnswMachine::AnswMachine(struct in_addr r_addr,
l_name, /* the caller (remote) */
local_user,
ntalkProtocol); /* the callee (local) */
- if (mode==PROC_REQ_ANSWMACH_NOT_HERE)
+ if (mode==PROC_RETQ_ANSWMACH_NOT_HERE)
{
/* The caller is trying to talk to somebody this system doesn't know.
We can display a NEU banner (non-existent user) and take a message
@@ -113,7 +113,7 @@ void AnswMachine::start()
If NEU/not logged, start quickly. (Wait just a little for the
LEAVE_INVITE to come.) */
- sleep( (mode==PROC_REQ_ANSWMACH) ? Options.time_before_answmach : 1 );
+ sleep( (mode==PROC_RETQ_ANSWMACH) ? Options.time_before_answmach : 1 );
usercfg = init_user_config(local_user);
@@ -216,7 +216,7 @@ void AnswMachine::talk()
{ /* => Display Options.invitelines */
talkconn->write_banner(Options.invitelines);
}
- else if (mode==PROC_REQ_ANSWMACH_NOT_HERE)
+ else if (mode==PROC_RETQ_ANSWMACH_NOT_HERE)
{ /* => Display Options.NEUBanner* */
talkconn->write_banner(Options.NEUBanner1);
talkconn->write_banner(Options.NEUBanner2);
@@ -313,7 +313,7 @@ void AnswMachine::write_headers(FILE * fd, struct hostent * hp, char *
strcpy(messg_tmpl,"Message left in the answering machine, by %s@%s");
snprintf(messg,S_MESSG,messg_tmpl,r_user,hp->h_name);
- if (mode==PROC_REQ_ANSWMACH_NOT_HERE)
+ if (mode==PROC_RETQ_ANSWMACH_NOT_HERE)
{
char tmp[ NEW_NAME_SIZE + 10 ];
snprintf(tmp, NEW_NAME_SIZE + 9, " => '%s'", NEUperson);
diff --git a/ktalkd/ktalkd/machines/forwmach.cpp b/ktalkd/ktalkd/machines/forwmach.cpp
index 402e4f01..f94c15d4 100644
--- a/ktalkd/ktalkd/machines/forwmach.cpp
+++ b/ktalkd/ktalkd/machines/forwmach.cpp
@@ -224,14 +224,14 @@ void ForwMachine::connect_FWT(TalkConnection * tcCaller)
int socktA = tcAnsw->get_sockt();
int max_sockt = (socktC>socktA) ? socktC : socktA;
unsigned char buf[BUFSIZ];
- fd_set read_mask;
+ fd_set read_tqmask;
int nb;
int nbtot = 0;
for (;;) {
- FD_ZERO(&read_mask);
- FD_SET(socktA, &read_mask); // wait on both connections
- FD_SET(socktC, &read_mask);
- nb = select(max_sockt+1, &read_mask, NULL, NULL, NULL); // no timeout
+ FD_ZERO(&read_tqmask);
+ FD_SET(socktA, &read_tqmask); // wait on both connections
+ FD_SET(socktC, &read_tqmask);
+ nb = select(max_sockt+1, &read_tqmask, NULL, NULL, NULL); // no timeout
if (nb <= 0) {
if (errno == EINTR) {
continue;
@@ -239,12 +239,12 @@ void ForwMachine::connect_FWT(TalkConnection * tcCaller)
/* panic, we don't know what happened */
TalkConnection::p_error("Unexpected error from select");
}
- if (FD_ISSET(socktA, &read_mask)) {
+ if (FD_ISSET(socktA, &read_tqmask)) {
/* There is data on sockt A */
nb = transmit_chars(socktA, socktC, buf);
if (nb==0) return ;
}
- if (FD_ISSET(socktC, &read_mask)) {
+ if (FD_ISSET(socktC, &read_tqmask)) {
/* There is data on sockt C */
nb = transmit_chars(socktC, socktA, buf);
if (nb==0) return ;
@@ -284,7 +284,7 @@ void ForwMachine::sendResponse(const struct talk_addr target, NEW_CTL_RESPONSE *
* value of answ_id_num) and waits for SIGDELETE to use this value. */
void ForwMachine::processAnnounce()
{
- if ((pid=fork())==0) // store pid in the parent
+ if ((pid=fork())==0) // store pid in the tqparent
{
// Send announce to the answerer, and wait for response
ktalk_debug("-------------- ForwMachine : sending ANNOUNCE to %s",answ_user);
diff --git a/ktalkd/ktalkd/machines/talkconn.cpp b/ktalkd/ktalkd/machines/talkconn.cpp
index b2e5710a..c7b8e738 100644
--- a/ktalkd/ktalkd/machines/talkconn.cpp
+++ b/ktalkd/ktalkd/machines/talkconn.cpp
@@ -247,13 +247,13 @@ void TalkConnection::findProtocol() {
daemon.sin_addr = his_machine_addr;
/* Prepare the variables used for reading on sockets */
- fd_set read_mask, ctl_mask;
+ fd_set read_tqmask, ctl_tqmask;
int nready=0, cc;
struct timeval wait;
- FD_ZERO(&ctl_mask);
- FD_SET(new_socket, &ctl_mask);
- FD_SET(old_socket, &ctl_mask);
+ FD_ZERO(&ctl_tqmask);
+ FD_SET(new_socket, &ctl_tqmask);
+ FD_SET(old_socket, &ctl_tqmask);
int max_socket = (new_socket > old_socket) ? new_socket : old_socket;
/* Method : we send the two packets to the two remote daemons.
@@ -279,10 +279,10 @@ void TalkConnection::findProtocol() {
do {
/* Wait for response */
- read_mask = ctl_mask;
+ read_tqmask = ctl_tqmask;
wait.tv_sec = CTL_WAIT;
wait.tv_usec = 0;
- nready = ::select(max_socket+1, &read_mask, 0, 0, &wait);
+ nready = ::select(max_socket+1, &read_tqmask, 0, 0, &wait);
if (nready < 0) {
if (errno == EINTR)
continue;
@@ -292,7 +292,7 @@ void TalkConnection::findProtocol() {
if (nready == 0) ktalk_debug("select returned 0 ! ");
/* Analyze response */
- if (FD_ISSET(old_socket, &read_mask)) {
+ if (FD_ISSET(old_socket, &read_tqmask)) {
ktalk_debug("Reading on old_socket");
cc = ::recv(old_socket, (char *)&old_resp, sizeof (old_resp), 0);
if (cc < 0) {
@@ -302,7 +302,7 @@ void TalkConnection::findProtocol() {
} else
if (old_resp.type == LOOK_UP) protocol=talkProtocol; // FOUND
}
- if (FD_ISSET(new_socket, &read_mask)) {
+ if (FD_ISSET(new_socket, &read_tqmask)) {
ktalk_debug("Reading on new_socket");
cc = ::recv(new_socket, (char *)&new_resp, sizeof (new_resp), 0);
if (cc < 0) {
@@ -364,7 +364,7 @@ void TalkConnection::ctl_transact(int type, int id_num)
* Let's check it, the way ktalk does. */
findProtocol();
- fd_set read_mask, ctl_mask;
+ fd_set read_tqmask, ctl_tqmask;
int nready=0, cc, size, ok=0;
struct timeval wait;
struct sockaddr_in daemon_addr;
@@ -386,8 +386,8 @@ void TalkConnection::ctl_transact(int type, int id_num)
daemon_addr.sin_family = AF_INET;
daemon_addr.sin_addr = his_machine_addr;
daemon_addr.sin_port = (protocol == talkProtocol) ? talkDaemonPort : ntalkDaemonPort;
- FD_ZERO(&ctl_mask);
- FD_SET(ctl_sockt, &ctl_mask);
+ FD_ZERO(&ctl_tqmask);
+ FD_SET(ctl_sockt, &ctl_tqmask);
/* Keep sending the message until a response of
* the proper type is obtained.
@@ -403,10 +403,10 @@ void TalkConnection::ctl_transact(int type, int id_num)
continue;
p_error("Error on write to talk daemon");
}
- read_mask = ctl_mask;
+ read_tqmask = ctl_tqmask;
wait.tv_sec = CTL_WAIT;
wait.tv_usec = 0;
- nready = ::select(ctl_sockt+1, &read_mask, 0, 0, &wait);
+ nready = ::select(ctl_sockt+1, &read_tqmask, 0, 0, &wait);
if (nready < 0) {
if (errno == EINTR)
continue;
@@ -429,10 +429,10 @@ void TalkConnection::ctl_transact(int type, int id_num)
continue;
p_error("Error on read from talk daemon");
}
- read_mask = ctl_mask;
+ read_tqmask = ctl_tqmask;
/* an immediate poll */
timerclear(&wait);
- nready = ::select(ctl_sockt+1, &read_mask, 0, 0, &wait);
+ nready = ::select(ctl_sockt+1, &read_tqmask, 0, 0, &wait);
if (protocol == talkProtocol) ok = (old_resp.type == type);
else ok = ((new_resp.type == type) && (new_resp.vers == TALK_VERSION));
} while (nready > 0 && (!ok));
diff --git a/ktalkd/ktalkd/process.cpp b/ktalkd/ktalkd/process.cpp
index 6c638d57..ce67a2b4 100644
--- a/ktalkd/ktalkd/process.cpp
+++ b/ktalkd/ktalkd/process.cpp
@@ -102,14 +102,14 @@ int process_request(NEW_CTL_MSG *mp, NEW_CTL_RESPONSE *rp, const char* theirhos
print_request("process_request", mp);
if (!prepare_response(mp, rp))
- return PROC_REQ_ERR;
+ return PROC_RETQ_ERR;
/* Ensure null-termination */
mp->l_name[sizeof(mp->l_name)-1] = 0;
mp->r_name[sizeof(mp->r_name)-1] = 0;
mp->r_tty[sizeof(mp->r_tty)-1] = 0;
- ret = PROC_REQ_OK;
+ ret = PROC_RETQ_OK;
switch (mp->type) {
@@ -121,8 +121,8 @@ int process_request(NEW_CTL_MSG *mp, NEW_CTL_RESPONSE *rp, const char* theirhos
/* Store in table if normal announce or answmach replacing it.
Not if re-announce, nor if error, nor for forwarding machine */
- if ((ret == PROC_REQ_OK) || (ret == PROC_REQ_ANSWMACH_NOT_LOGGED)
- || (ret == PROC_REQ_ANSWMACH_NOT_HERE))
+ if ((ret == PROC_RETQ_OK) || (ret == PROC_RETQ_ANSWMACH_NOT_LOGGED)
+ || (ret == PROC_RETQ_ANSWMACH_NOT_HERE))
ktable->insert_table(mp, rp, 0L);
case LEAVE_INVITE:
@@ -143,7 +143,7 @@ int process_request(NEW_CTL_MSG *mp, NEW_CTL_RESPONSE *rp, const char* theirhos
rp->answer = SUCCESS;
} else {
if (ForwMachine::forwMachProcessLookup(ktable->getTable(), mp)) {
- ret = PROC_REQ_FORWMACH; // Don't send any response, forwmach will do it
+ ret = PROC_RETQ_FORWMACH; // Don't send any response, forwmach will do it
} else
rp->answer = NOT_HERE;
}
@@ -157,7 +157,7 @@ int process_request(NEW_CTL_MSG *mp, NEW_CTL_RESPONSE *rp, const char* theirhos
rp->answer = UNKNOWN_REQUEST;
break;
}
- if (ret != PROC_REQ_FORWMACH)
+ if (ret != PROC_RETQ_FORWMACH)
print_response("=> response", rp);
if (mp->vers == 0) { // it's kotalkd talking to us.
// Let's prepare an OTALK response, shifting the first 2 fields
@@ -187,7 +187,7 @@ int do_announce(NEW_CTL_MSG *mp, NEW_CTL_RESPONSE *rp, const char* theirhost, in
ktalk_debug("dupannounce %d", mp->id_num);
rp->id_num = htonl(ptr->id_num);
rp->answer = SUCCESS;
- return PROC_REQ_ERR;
+ return PROC_RETQ_ERR;
} else {
if (ptr == (NEW_CTL_MSG *) 0) { /* Not already in the table */
@@ -202,7 +202,7 @@ int do_announce(NEW_CTL_MSG *mp, NEW_CTL_RESPONSE *rp, const char* theirhost, in
(FWR & FWT) : we'll receive the LOOK_UP */
ktable->insert_table(mp, 0L, fwm);
fwm->start(mp->id_num);
- return PROC_REQ_FORWMACH;
+ return PROC_RETQ_FORWMACH;
}
}
@@ -223,7 +223,7 @@ int do_announce(NEW_CTL_MSG *mp, NEW_CTL_RESPONSE *rp, const char* theirhost, in
ktalk_debug("Not logged.");
rp->answer = SUCCESS;
endpwent();
- return PROC_REQ_ANSWMACH_NOT_LOGGED; /* answer machine. */
+ return PROC_RETQ_ANSWMACH_NOT_LOGGED; /* answer machine. */
} else
{ /* Non-existent user ... */
endpwent();
@@ -236,11 +236,11 @@ int do_announce(NEW_CTL_MSG *mp, NEW_CTL_RESPONSE *rp, const char* theirhost, in
case 2: /* Paranoid setting. Do nothing. */
ktalk_debug("Paranoid setting. Do nothing.");
rp->answer = NOT_HERE;
- return PROC_REQ_ERR;
+ return PROC_RETQ_ERR;
case 0: /* Launch answering machine. */
ktalk_debug("Not here.");
rp->answer = SUCCESS;
- return PROC_REQ_ANSWMACH_NOT_HERE;
+ return PROC_RETQ_ANSWMACH_NOT_HERE;
case 1: /* NEU_user will take the talk. */
ktalk_debug("Not here. I ll take the talk.");
fwm = new ForwMachine(mp, Options.NEU_user,
@@ -248,14 +248,14 @@ int do_announce(NEW_CTL_MSG *mp, NEW_CTL_RESPONSE *rp, const char* theirhost, in
/* store in table, because we'll receive the LOOK_UP */
ktable->insert_table(mp, 0L, fwm);
fwm->start(mp->id_num);
- return PROC_REQ_FORWMACH;
+ return PROC_RETQ_FORWMACH;
} /* switch */
} /* getpwnam */
} /* result */
else {
ktalk_debug("not SUCCESS, nor NOT_HERE");
rp->answer = result; /* not SUCCESS, nor NOT_HERE*/
- return PROC_REQ_ERR;
+ return PROC_RETQ_ERR;
}
}
@@ -266,9 +266,9 @@ int do_announce(NEW_CTL_MSG *mp, NEW_CTL_RESPONSE *rp, const char* theirhost, in
if (ptr == (NEW_CTL_MSG *) 0) { /* Not already in the table => announce */
rp->answer = announce(mp, theirhost, disp, usercfg, callee);
- if (rp->answer == PERMISSION_DENIED) return PROC_REQ_ERR;
+ if (rp->answer == PERMISSION_DENIED) return PROC_RETQ_ERR;
ktalk_debug("Announce done.");
- return PROC_REQ_OK;
+ return PROC_RETQ_OK;
} else {
/* This is an explicit re-announce, so update the id_num
* field to avoid duplicates and re-announce the talk. */
@@ -279,7 +279,7 @@ int do_announce(NEW_CTL_MSG *mp, NEW_CTL_RESPONSE *rp, const char* theirhost, in
ptr->id_num = new_id_num; /* update in the table */
rp->id_num = htonl(ptr->id_num);
rp->answer = announce(mp, theirhost, disp, usercfg, callee);
- return PROC_REQ_ANSWMACH;
+ return PROC_RETQ_ANSWMACH;
}
}
}
diff --git a/ktalkd/ktalkd/proto.h b/ktalkd/ktalkd/proto.h
index 7679a9f2..ca74416c 100644
--- a/ktalkd/ktalkd/proto.h
+++ b/ktalkd/ktalkd/proto.h
@@ -37,8 +37,8 @@ extern "C" {
/* quirks for repairs.c */
-#define QUIRK_NONE 0
-#define QUIRK_OTALK 1
+#define TQUIRK_NONE 0
+#define TQUIRK_OTALK 1
struct sockaddr_in;
diff --git a/ktalkd/ktalkd/readcfg++.cpp b/ktalkd/ktalkd/readcfg++.cpp
index b18edbff..df14af8a 100644
--- a/ktalkd/ktalkd/readcfg++.cpp
+++ b/ktalkd/ktalkd/readcfg++.cpp
@@ -49,7 +49,7 @@
#include <ctype.h>
#include <pwd.h>
-/* KDE & Qt includes */
+/* KDE & TQt includes */
#include <kconfig.h>
#include <kstandarddirs.h>
#include <kinstance.h>
@@ -181,7 +181,7 @@ int process_config_file(void)
{
// Where is ktalkdlg installed ?
TQString ktalkdlg_dir = locate("exe", "ktalkdlg");
- ktalkdlg_dir.truncate( ktalkdlg_dir.findRev('/') );
+ ktalkdlg_dir.truncate( ktalkdlg_dir.tqfindRev('/') );
// Has to be done, for any $KDEBINDIR in ktalkdrc.
setenv("KDEBINDIR", TQFile::encodeName(ktalkdlg_dir), 0/*don't overwrite*/);
diff --git a/ktalkd/ktalkd/repairs.c b/ktalkd/ktalkd/repairs.c
index 9473a473..98804c17 100644
--- a/ktalkd/ktalkd/repairs.c
+++ b/ktalkd/ktalkd/repairs.c
@@ -140,34 +140,34 @@ static int probe_otalk_packet(char *buf, size_t len, size_t maxlen,
struct otalk_packet otp;
CTL_MSG m;
- ktalk_debug("Probing for QUIRK_OTALK\n");
+ ktalk_debug("Probing for TQUIRK_OTALK\n");
if (sizeof(otp)!=OTALK_PACKET_SIZE) {
- syslog(LOG_ERR, "QUIRK_OTALK: struct otalk_packet padding "
+ syslog(LOG_ERR, "TQUIRK_OTALK: struct otalk_packet padding "
"is wrong\n");
return -1;
}
if (len!=sizeof(otp)) {
- ktalk_debug("QUIRK_OTALK: wrong size\n");
+ ktalk_debug("TQUIRK_OTALK: wrong size\n");
return -1;
}
memcpy(&otp, buf, len);
if (probe_string(otp.l_name, sizeof(otp.l_name))) {
- ktalk_debug("QUIRK_OTALK: l_name not a string\n");
+ ktalk_debug("TQUIRK_OTALK: l_name not a string\n");
return -1;
}
if (probe_string(otp.r_name, sizeof(otp.r_name))) {
- ktalk_debug("QUIRK_OTALK: r_name not a string\n");
+ ktalk_debug("TQUIRK_OTALK: r_name not a string\n");
return -1;
}
if (probe_string(otp.r_tty, sizeof(otp.r_tty))) {
- ktalk_debug("QUIRK_OTALK: r_tty not a string\n");
+ ktalk_debug("TQUIRK_OTALK: r_tty not a string\n");
return -1;
}
if (probe_addr(&otp.ctl_addr, sn)) {
- ktalk_debug("QUIRK_OTALK: addresses do not match\n");
+ ktalk_debug("TQUIRK_OTALK: addresses do not match\n");
return -1;
}
@@ -182,17 +182,17 @@ static int probe_otalk_packet(char *buf, size_t len, size_t maxlen,
case OLD_AUTO_LOOK_UP: otp.type = LOOK_UP; break;
case OLD_AUTO_DELETE: otp.type = DELETE; break;
default:
- ktalk_debug("QUIRK_OTALK: invalid type field\n");
+ ktalk_debug("TQUIRK_OTALK: invalid type field\n");
return -1;
}
if (OLD_NAME_SIZE >= NAME_SIZE) {
- syslog(LOG_ERR, "QUIRK_OTALK: OLD_NAME_SIZE >= NAME_SIZE\n");
- syslog(LOG_ERR, "QUIRK_OTALK: fix repairs.c and recompile\n");
+ syslog(LOG_ERR, "TQUIRK_OTALK: OLD_NAME_SIZE >= NAME_SIZE\n");
+ syslog(LOG_ERR, "TQUIRK_OTALK: fix repairs.c and recompile\n");
return -1;
}
if (maxlen < sizeof(CTL_MSG)) {
- syslog(LOG_ERR, "QUIRK_OTALK: maxlen too small; enlarge "
+ syslog(LOG_ERR, "TQUIRK_OTALK: maxlen too small; enlarge "
"inbuf[] in talkd.c and recompile\n");
return -1;
}
@@ -219,7 +219,7 @@ static size_t do_otalk_reply(char *buf, size_t maxlen) {
struct otalk_reply or;
CTL_RESPONSE *r = (CTL_RESPONSE *)buf;
if (sizeof(or) > maxlen) {
- syslog(LOG_ERR, "QUIRK_OTALK: reply: maxlen too small; "
+ syslog(LOG_ERR, "TQUIRK_OTALK: reply: maxlen too small; "
"enlarge buf[] in send_packet and recompile\n");
return sizeof(CTL_RESPONSE);
}
@@ -256,8 +256,8 @@ rationalize_packet(char *buf, size_t len, size_t mlen, struct sockaddr_in *sn)
ktalk_debug("Malformed packet (length %u)\n", len);
if (probe_otalk_packet(buf, len, mlen, sn)==0) {
- ktalk_debug("Using QUIRK_OTALK\n");
- return QUIRK_OTALK;
+ ktalk_debug("Using TQUIRK_OTALK\n");
+ return TQUIRK_OTALK;
}
return -1;
}
@@ -266,8 +266,8 @@ size_t
irrationalize_reply(char *buf, size_t maxlen, int quirk)
{
switch (quirk) {
- case QUIRK_NONE: return sizeof(CTL_RESPONSE);
- case QUIRK_OTALK: return do_otalk_reply(buf, maxlen);
+ case TQUIRK_NONE: return sizeof(CTL_RESPONSE);
+ case TQUIRK_OTALK: return do_otalk_reply(buf, maxlen);
}
/* ? */
return 0;
diff --git a/ktalkd/ktalkd/talkd.cpp b/ktalkd/ktalkd/talkd.cpp
index 0f2f27a0..3914ada2 100644
--- a/ktalkd/ktalkd/talkd.cpp
+++ b/ktalkd/ktalkd/talkd.cpp
@@ -184,7 +184,7 @@ do_one_packet(void)
struct sockaddr_in sn;
int cc, i, ok;
socklen_t addrlen;
- int ret_value = PROC_REQ_OK; /* return value from process_request */
+ int ret_value = PROC_RETQ_OK; /* return value from process_request */
addrlen = sizeof(sn);
cc = recvfrom(0, inbuf, sizeof(inbuf), 0,
@@ -326,13 +326,13 @@ do_one_packet(void)
ret_value = process_request(mp, &response, theirhost);
- if (ret_value != PROC_REQ_FORWMACH)
+ if (ret_value != PROC_RETQ_FORWMACH)
{
/* can block here, is this what I want? */
send_packet(&response, &sn, quirk);
}
- if (Options.answmach && (ret_value>=PROC_REQ_MIN_A))
+ if (Options.answmach && (ret_value>=PROC_RETQ_MIN_A))
{
ktalk_debug("Launch answer machine, mode %d.", ret_value);
AnswMachine::launchAnswMach(*mp, ret_value);
diff --git a/ktalkd/ktalkd/threads.cpp b/ktalkd/ktalkd/threads.cpp
index 09d5bb4c..c0c7b5d8 100644
--- a/ktalkd/ktalkd/threads.cpp
+++ b/ktalkd/ktalkd/threads.cpp
@@ -44,7 +44,7 @@ static int nb_child_to_wait=0;
#undef DEBUG_THREADS
-/** Register a new process (by just increasing the number of children */
+/** Register a new process (by just increasing the number of tqchildren */
void new_process()
{
nb_child_to_wait++;
@@ -76,7 +76,7 @@ int wait_process(int pid)
return status;
}
-/** Wait for children (if any) to exit. Return 1 if no more child to wait */
+/** Wait for tqchildren (if any) to exit. Return 1 if no more child to wait */
int ack_process()
{
if (nb_child_to_wait>0)
diff --git a/ktalkd/ktalkd/threads.h b/ktalkd/ktalkd/threads.h
index 5d76e54e..280262da 100644
--- a/ktalkd/ktalkd/threads.h
+++ b/ktalkd/ktalkd/threads.h
@@ -31,9 +31,9 @@
* (BSD License, from kdelibs/doc/common/bsd-license.html)
*/
-/** Register a new process (by just increasing the number of children */
+/** Register a new process (by just increasing the number of tqchildren */
void new_process();
/** Wait for a given process - not registered - and see if others exited */
int wait_process(int pid);
-/** Wait for children (if any) to exit. Return 1 if no more child to wait */
+/** Wait for tqchildren (if any) to exit. Return 1 if no more child to wait */
int ack_process();
diff --git a/ktalkd/ktalkd/unixsock.cpp b/ktalkd/ktalkd/unixsock.cpp
index 9547ccf5..c99264b0 100644
--- a/ktalkd/ktalkd/unixsock.cpp
+++ b/ktalkd/ktalkd/unixsock.cpp
@@ -105,7 +105,7 @@ bool sendToKtalk (const char *username, const char *announce)
// by me but someone else!)
//
// Besides, this approach allows me to snoop on the
- // talk requests other users receive; if I want to find
+ // talk requests other users receive; if I want to tqfind
// out who's talking to janet, all I need is to write
// a small app that listens on /tmp/ktalk-janet-foo
//
diff --git a/ktalkd/ktalkdlg/ktalkdlg.cpp b/ktalkd/ktalkdlg/ktalkdlg.cpp
index 336c9a04..9e2996e5 100644
--- a/ktalkd/ktalkdlg/ktalkdlg.cpp
+++ b/ktalkd/ktalkdlg/ktalkdlg.cpp
@@ -47,17 +47,17 @@ 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 *tqparent=0, const char *name=0, bool modal=TRUE,
WFlags f=WStyle_DialogBorder ):
TQMessageBox (caption, text, icon, button0, button1, button2,
- parent, name, modal, f)
+ tqparent, name, modal, f)
{startTimer (timeout_ms);}
~TimeoutDialog ()
- {killTimers ();}
+ {TQT_TQOBJECT(this)->killTimers ();}
virtual void timerEvent (TQTimerEvent *)
- {killTimers (); done (Rejected);}
+ {TQT_TQOBJECT(this)->killTimers (); done (Rejected);}
};
static KCmdLineOptions option[] =
@@ -98,7 +98,7 @@ int main (int argc, char **argv)
{
s += '\n';
TQString callee = args->arg(1);
- s += i18n ("for user %1").arg( callee.isEmpty() ? i18n("<nobody>") : callee );
+ s += i18n ("for user %1").tqarg( callee.isEmpty() ? i18n("<nobody>") : callee );
}
s += ".";
@@ -135,12 +135,12 @@ int main (int argc, char **argv)
int result = dialog.exec ();
if (result == TQMessageBox::Yes) {
- dialog.killTimers ();
+ TQT_TQOBJECT(&dialog)->killTimers ();
kdDebug() << "Running talk client..." << endl;
TQString konsole = locate("exe", "konsole");
TQString konsole_dir = konsole;
- konsole_dir.truncate( konsole.findRev('/') );
+ konsole_dir.truncate( konsole.tqfindRev('/') );
setenv("KDEBINDIR", TQFile::encodeName(konsole_dir).data(), 0/*don't overwrite*/);
TQString cmd0 = cfg->readPathEntry ("talkprg", konsole + " -e talk");
diff --git a/ktalkd/mail.local/mail.local.c b/ktalkd/mail.local/mail.local.c
index 9c90d272..c72b4d1f 100644
--- a/ktalkd/mail.local/mail.local.c
+++ b/ktalkd/mail.local/mail.local.c
@@ -754,8 +754,8 @@ e_to_sys(num)
#ifdef EAGAIN
case EAGAIN: /* Resource temporarily unavailable */
#endif
-#ifdef EDQUOT
- case EDQUOT: /* Disc quota exceeded */
+#ifdef EDTQUOT
+ case EDTQUOT: /* Disc quota exceeded */
#endif
#ifdef EBUSY
case EBUSY: /* Device busy */