diff --git a/tdecore/kdcoppropertyproxy.cpp b/tdecore/kdcoppropertyproxy.cpp index 714e445bc..babf888fd 100644 --- a/tdecore/kdcoppropertyproxy.cpp +++ b/tdecore/kdcoppropertyproxy.cpp @@ -121,6 +121,22 @@ TQValueList KDCOPPropertyProxy::functions( TQObject *object ) return res; } +#define MARSHAL( type ) \ + case TQVariant::type: \ + { \ + reply << prop.to##type(); \ + break; \ + } + +#define DEMARSHAL( type, val ) \ + case TQVariant::type: \ + { \ + val v; \ + stream >> v; \ + prop = TQVariant( v ); \ + break; \ + } + bool KDCOPPropertyProxy::processPropertyRequest( const TQCString &fun, const TQByteArray &data, TQCString &replyType, TQByteArray &replyData, TQObject *object ) @@ -184,15 +200,6 @@ bool KDCOPPropertyProxy::processPropertyRequest( const TQCString &fun, const TQB if ( type == TQVariant::Invalid ) return false; -#define DEMARSHAL( type, val ) \ - case TQVariant::type: \ - { \ - val v; \ - stream >> v; \ - prop = TQVariant( v ); \ - } \ - break; - typedef TQValueList ListType; typedef TQStringVariantMap MapType; @@ -251,11 +258,6 @@ bool KDCOPPropertyProxy::processPropertyRequest( const TQCString &fun, const TQB replyType = prop.typeName(); TQDataStream reply( replyData, IO_WriteOnly ); -#define MARSHAL( type ) \ - case TQVariant::type: \ - reply << prop.to##type(); \ - break; - switch ( prop.type() ) { MARSHAL( Cursor ) diff --git a/tdecore/ksimpledirwatch.cpp b/tdecore/ksimpledirwatch.cpp index 3861b52d2..cbb4ce682 100644 --- a/tdecore/ksimpledirwatch.cpp +++ b/tdecore/ksimpledirwatch.cpp @@ -1501,10 +1501,14 @@ void KSimpleDirWatchPrivate::checkFAMEvent(FAMEvent* fe) removeEntry(0,e->path,sub_entry); // can be invalid here!! sub_entry->m_status = Normal; if (!useFAM(sub_entry)) + { #ifdef HAVE_INOTIFY if (!useINotify(sub_entry )) #endif + { useStat(sub_entry); + } + } } break; } diff --git a/tdehtml/tdehtml_caret.cpp b/tdehtml/tdehtml_caret.cpp index 3d81997f0..71d30629b 100644 --- a/tdehtml/tdehtml_caret.cpp +++ b/tdehtml/tdehtml_caret.cpp @@ -1952,8 +1952,10 @@ kdDebug(6200) << "box " << box << " b " << box->inlineBox() << " isText " << box && !(*ebit)->isInlineTextBox()) { EditableCaretBoxIterator copy = ebit; --ebit; - if (ebit == (*_it)->preBegin()) /*adjacent = false; - else */ebit = copy; + if (ebit == (*_it)->preBegin()) + /*adjacent = false; + else */ + ebit = copy; }/*end if*/ #endif #if 0 diff --git a/tdeio/tdeio/kdirwatch.cpp b/tdeio/tdeio/kdirwatch.cpp index 60f7945ac..b3763978d 100644 --- a/tdeio/tdeio/kdirwatch.cpp +++ b/tdeio/tdeio/kdirwatch.cpp @@ -1549,10 +1549,14 @@ void KDirWatchPrivate::checkFAMEvent(FAMEvent* fe) removeEntry(0,e->path,sub_entry); // can be invalid here!! sub_entry->m_status = Normal; if (!useFAM(sub_entry)) + { #ifdef HAVE_INOTIFY if (!useINotify(sub_entry )) #endif + { useStat(sub_entry); + } + } } break; } diff --git a/tdeprint/cups/cupsdconf2/cups-util.c b/tdeprint/cups/cupsdconf2/cups-util.c index 3772b35d0..e3039ea94 100644 --- a/tdeprint/cups/cupsdconf2/cups-util.c +++ b/tdeprint/cups/cupsdconf2/cups-util.c @@ -237,11 +237,11 @@ cupsGetConf(void) while ((bytes = #if CUPS_VERSION_MAJOR < 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 2) - httpRead + httpRead(cups_server, buffer, sizeof(buffer)) #else - httpRead2 + httpRead2(cups_server, buffer, sizeof(buffer)) #endif - (cups_server, buffer, sizeof(buffer))) > 0) + ) > 0) { write(fd, buffer, bytes); } @@ -341,21 +341,22 @@ cupsPutConf(const char *name) /* I - Name of the config file to send */ break; } else + { #if CUPS_VERSION_MAJOR < 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 2) - httpWrite + httpWrite(cups_server, buffer, bytes); #else - httpWrite2 + httpWrite2(cups_server, buffer, bytes); #endif - (cups_server, buffer, bytes); + } if (status == HTTP_CONTINUE) { #if CUPS_VERSION_MAJOR < 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 2) - httpWrite + httpWrite(cups_server, buffer, 0); #else - httpWrite2 + httpWrite2(cups_server, buffer, 0); #endif - (cups_server, buffer, 0); + while ((status = httpUpdate(cups_server)) == HTTP_CONTINUE); } diff --git a/tdeprint/cups/ipprequest.cpp b/tdeprint/cups/ipprequest.cpp index 8a363152b..943eea82a 100644 --- a/tdeprint/cups/ipprequest.cpp +++ b/tdeprint/cups/ipprequest.cpp @@ -103,7 +103,7 @@ void dumpRequest(ipp_t *req, bool answer = false, const TQString& s = TQString:: kdDebug(500) << s << endl; attr = ippNextAttribute(req); } -#else // HAVE_CUPS_1_6 +#else kdDebug(500) << "State = 0x" << TQString::number(req->state, 16) << endl; kdDebug(500) << "ID = 0x" << TQString::number(req->request.status.request_id, 16) << endl; if (answer) @@ -152,7 +152,7 @@ void dumpRequest(ipp_t *req, bool answer = false, const TQString& s = TQString:: kdDebug(500) << s << endl; attr = attr->next; } -#endif // HAVE_CUPS_1_6 +#endif } TQString errorString(int status) @@ -258,9 +258,9 @@ void IppRequest::addIntegerList_p(int group, int type, const TQString& name, con for (TQValueList::ConstIterator it=values.begin(); it != values.end(); ++it, i++) #ifdef HAVE_CUPS_1_6 ippSetInteger(request_, &attr, i, *it); -#else // HAVE_CUPS_1_6 +#else attr->values[i].integer = *it; -#endif // HAVE_CUPS_1_6 +#endif } } @@ -278,9 +278,9 @@ void IppRequest::addBoolean(int group, const TQString& name, const TQValueList::ConstIterator it=values.begin(); it != values.end(); ++it, i++) #ifdef HAVE_CUPS_1_6 ippSetBoolean(request_, &attr, i, (char)(*it)); -#else // HAVE_CUPS_1_6 +#else attr->values[i].boolean = (char)(*it); -#endif // HAVE_CUPS_1_6 +#endif } } @@ -289,19 +289,19 @@ void IppRequest::setOperation(int op) #ifdef HAVE_CUPS_1_6 ippSetOperation(request_, (ipp_op_t)op); ippSetRequestId(request_, 1); // 0 is not RFC-compliant, should be at least 1 -#else // HAVE_CUPS_1_6 +#else request_->request.op.operation_id = (ipp_op_t)op; request_->request.op.request_id = 1; // 0 is not RFC-compliant, should be at least 1 -#endif // HAVE_CUPS_1_6 +#endif } int IppRequest::status() { #ifdef HAVE_CUPS_1_6 return (request_ ? ippGetStatusCode(request_) : (connect_ ? cupsLastError() : -2)); -#else // HAVE_CUPS_1_6 +#else return (request_ ? request_->request.status.status_code : (connect_ ? cupsLastError() : -2)); -#endif // HAVE_CUPS_1_6 +#endif } TQString IppRequest::statusMessage() @@ -330,9 +330,9 @@ bool IppRequest::integerValue_p(const TQString& name, int& value, int type) { #ifdef HAVE_CUPS_1_6 value = ippGetInteger(attr, 0); -#else // HAVE_CUPS_1_6 +#else value = attr->values[0].integer; -#endif // HAVE_CUPS_1_6 +#endif return true; } else return false; @@ -346,9 +346,9 @@ bool IppRequest::stringValue_p(const TQString& name, TQString& value, int type) { #ifdef HAVE_CUPS_1_6 value = TQString::fromLocal8Bit(ippGetString(attr, 0, NULL)); -#else // HAVE_CUPS_1_6 +#else value = TQString::fromLocal8Bit(attr->values[0].string.text); -#endif // HAVE_CUPS_1_6 +#endif return true; } else return false; @@ -364,10 +364,10 @@ bool IppRequest::stringListValue_p(const TQString& name, TQStringList& values, i #ifdef HAVE_CUPS_1_6 for (int i=0;inum_values;i++) values.append(TQString::fromLocal8Bit(attr->values[i].string.text)); -#endif // HAVE_CUPS_1_6 +#endif return true; } else return false; @@ -381,9 +381,9 @@ bool IppRequest::boolean(const TQString& name, bool& value) { #ifdef HAVE_CUPS_1_6 value = (bool)ippGetBoolean(attr, 0); -#else // HAVE_CUPS_1_6 +#else value = (bool)attr->values[0].boolean; -#endif // HAVE_CUPS_1_6 +#endif return true; } else return false; @@ -437,16 +437,16 @@ bool IppRequest::doFileRequest(const TQString& res, const TQString& filename) /* No printers found */ #ifdef HAVE_CUPS_1_6 if ( request_ && ippGetStatusCode(request_) == 0x406 ) -#else // HAVE_CUPS_1_6 +#else if ( request_ && request_->request.status.status_code == 0x406 ) -#endif // HAVE_CUPS_1_6 +#endif return true; #ifdef HAVE_CUPS_1_6 if (!request_ || ippGetState(request_) == IPP_ERROR || (ippGetStatusCode(request_) & 0x0F00)) -#else // HAVE_CUPS_1_6 +#else if (!request_ || request_->state == IPP_ERROR || (request_->request.status.status_code & 0x0F00)) -#endif // HAVE_CUPS_1_6 +#endif return false; @@ -465,11 +465,11 @@ bool IppRequest::htmlReport(int group, TQTextStream& output) ipp_attribute_t *attr = ippFirstAttribute(request_); while (attr && ippGetGroupTag(attr) != group) attr = ippNextAttribute(request_); -#else // HAVE_CUPS_1_6 +#else ipp_attribute_t *attr = request_->attrs; while (attr && attr->group_tag != group) attr = attr->next; -#endif // HAVE_CUPS_1_6 +#endif // print each attribute const ipp_uchar_t *d; TQCString dateStr; @@ -542,7 +542,7 @@ bool IppRequest::htmlReport(int group, TQTextStream& output) } output << "\n " << endl; attr = ippNextAttribute(request_); -#else // HAVE_CUPS_1_6 +#else while (attr && attr->group_tag == group) { output << " \n " << attr->name << "\n " << endl; @@ -602,7 +602,7 @@ bool IppRequest::htmlReport(int group, TQTextStream& output) } output << "\n " << endl; attr = attr->next; -#endif // HAVE_CUPS_1_6 +#endif } // end table output << "" << endl; @@ -670,7 +670,7 @@ TQMap IppRequest::toMap(int group) value.truncate(value.length()-1); opts[TQString::fromLocal8Bit(ippGetName(attr))] = value; attr = ippNextAttribute(request_); -#else // HAVE_CUPS_1_6 +#else if (group != -1 && attr->group_tag != group) { attr = attr->next; @@ -719,7 +719,7 @@ TQMap IppRequest::toMap(int group) value.truncate(value.length()-1); opts[TQString::fromLocal8Bit(attr->name)] = value; attr = attr->next; -#endif // HAVE_CUPS_1_6 +#endif } } return opts; @@ -780,7 +780,7 @@ void IppRequest::setMap(const TQMap& opts) #ifdef HAVE_CUPS_1_6 ipp_attribute_t* IppRequest::first() { return (request_ ? ippFirstAttribute(request_) : NULL); } -#else // HAVE_CUPS_1_6 +#else ipp_attribute_t* IppRequest::first() { return (request_ ? request_->attrs : NULL); } -#endif // HAVE_CUPS_1_6 +#endif diff --git a/tdespell2/plugins/ispell/makedent.cpp b/tdespell2/plugins/ispell/makedent.cpp index 407d5e2fb..5ed72215a 100644 --- a/tdespell2/plugins/ispell/makedent.cpp +++ b/tdespell2/plugins/ispell/makedent.cpp @@ -233,7 +233,7 @@ ichar_t * icharcpy P ((ichar_t * out, ichar_t * in)); int icharlen P ((ichar_t * str)); int icharcmp P ((ichar_t * s1, ichar_t * s2)); int icharncmp P ((ichar_t * s1, ichar_t * s2, int n)); -#endif /* ICHAR_IS_CHAR */ +#endif /*static int has_marker;*/ @@ -343,7 +343,7 @@ int ISpellChecker::addvheader ( struct dent *dp) dp->flagfield |= (ALLCAPS | MOREVARIANTS); return 0; } -#endif /* NO_CAPITALIZATION_SUPPORT */ +#endif /* ** Combine and resolve the entries describing two capitalizations of the same @@ -500,7 +500,7 @@ ISpellChecker::stringcharlen (char *bufp, int canonical) #ifdef SLOWMULTIPLY static char * sp[MAXSTRINGCHARS]; static int inited = 0; -#endif /* SLOWMULTIPLY */ +#endif char * bufcur; char * stringcur; int stringno; @@ -515,7 +515,7 @@ ISpellChecker::stringcharlen (char *bufp, int canonical) for (stringno = 0; stringno < MAXSTRINGCHARS; stringno++) sp[stringno] = &hashheader.stringchars[stringno][0]; } -#endif /* SLOWMULTIPLY */ +#endif lowstringno = 0; highstringno = m_hashheader.nstrchars - 1; dupwanted = canonical ? 0 : m_defdupchar; @@ -524,17 +524,17 @@ ISpellChecker::stringcharlen (char *bufp, int canonical) stringno = (lowstringno + highstringno) >> 1; #ifdef SLOWMULTIPLY stringcur = sp[stringno]; -#else /* SLOWMULTIPLY */ +#else stringcur = &m_hashheader.stringchars[stringno][0]; -#endif /* SLOWMULTIPLY */ +#endif bufcur = bufp; while (*stringcur) { #ifdef NO8BIT if (((*bufcur++ ^ *stringcur) & 0x7F) != 0) -#else /* NO8BIT */ +#else if (*bufcur++ != *stringcur) -#endif /* NO8BIT */ +#endif break; /* ** We can't use autoincrement above because of the @@ -550,9 +550,9 @@ ISpellChecker::stringcharlen (char *bufp, int canonical) m_laststringch = m_hashheader.stringdups[stringno]; #ifdef SLOWMULTIPLY return stringcur - sp[stringno]; -#else /* SLOWMULTIPLY */ +#else return stringcur - &m_hashheader.stringchars[stringno][0]; -#endif /* SLOWMULTIPLY */ +#endif } else --stringcur; @@ -563,12 +563,12 @@ ISpellChecker::stringcharlen (char *bufp, int canonical) highstringno = stringno - 1; else if ((*bufcur & 0x7F) > (*stringcur & 0x7F)) lowstringno = stringno + 1; -#else /* NO8BIT */ +#else if (*--bufcur < *stringcur) highstringno = stringno - 1; else if (*bufcur > *stringcur) lowstringno = stringno + 1; -#endif /* NO8BIT */ +#endif else if (dupwanted < m_hashheader.dupnos[stringno]) highstringno = stringno - 1; else @@ -846,7 +846,7 @@ icharncmp (ichar_t *s1, ichar_t *s2, int n) return *s1 - *s2; } -#endif /* ICHAR_IS_CHAR */ +#endif /* * \param istate