Fixed second pass uncrustify's code formatting offending files.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/115/head
Michele Calgaro 4 years ago
parent 225e0d0b0f
commit 9468d05e3d
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -121,6 +121,22 @@ TQValueList<TQCString> KDCOPPropertyProxy::functions( TQObject *object )
return res; 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, bool KDCOPPropertyProxy::processPropertyRequest( const TQCString &fun, const TQByteArray &data,
TQCString &replyType, TQByteArray &replyData, TQCString &replyType, TQByteArray &replyData,
TQObject *object ) TQObject *object )
@ -184,15 +200,6 @@ bool KDCOPPropertyProxy::processPropertyRequest( const TQCString &fun, const TQB
if ( type == TQVariant::Invalid ) if ( type == TQVariant::Invalid )
return false; return false;
#define DEMARSHAL( type, val ) \
case TQVariant::type: \
{ \
val v; \
stream >> v; \
prop = TQVariant( v ); \
} \
break;
typedef TQValueList<TQVariant> ListType; typedef TQValueList<TQVariant> ListType;
typedef TQStringVariantMap MapType; typedef TQStringVariantMap MapType;
@ -251,11 +258,6 @@ bool KDCOPPropertyProxy::processPropertyRequest( const TQCString &fun, const TQB
replyType = prop.typeName(); replyType = prop.typeName();
TQDataStream reply( replyData, IO_WriteOnly ); TQDataStream reply( replyData, IO_WriteOnly );
#define MARSHAL( type ) \
case TQVariant::type: \
reply << prop.to##type(); \
break;
switch ( prop.type() ) switch ( prop.type() )
{ {
MARSHAL( Cursor ) MARSHAL( Cursor )

@ -1501,10 +1501,14 @@ void KSimpleDirWatchPrivate::checkFAMEvent(FAMEvent* fe)
removeEntry(0,e->path,sub_entry); // <e> can be invalid here!! removeEntry(0,e->path,sub_entry); // <e> can be invalid here!!
sub_entry->m_status = Normal; sub_entry->m_status = Normal;
if (!useFAM(sub_entry)) if (!useFAM(sub_entry))
{
#ifdef HAVE_INOTIFY #ifdef HAVE_INOTIFY
if (!useINotify(sub_entry )) if (!useINotify(sub_entry ))
#endif #endif
{
useStat(sub_entry); useStat(sub_entry);
}
}
} }
break; break;
} }

@ -1952,8 +1952,10 @@ kdDebug(6200) << "box " << box << " b " << box->inlineBox() << " isText " << box
&& !(*ebit)->isInlineTextBox()) { && !(*ebit)->isInlineTextBox()) {
EditableCaretBoxIterator copy = ebit; EditableCaretBoxIterator copy = ebit;
--ebit; --ebit;
if (ebit == (*_it)->preBegin()) /*adjacent = false; if (ebit == (*_it)->preBegin())
else */ebit = copy; /*adjacent = false;
else */
ebit = copy;
}/*end if*/ }/*end if*/
#endif #endif
#if 0 #if 0

@ -1549,10 +1549,14 @@ void KDirWatchPrivate::checkFAMEvent(FAMEvent* fe)
removeEntry(0,e->path,sub_entry); // <e> can be invalid here!! removeEntry(0,e->path,sub_entry); // <e> can be invalid here!!
sub_entry->m_status = Normal; sub_entry->m_status = Normal;
if (!useFAM(sub_entry)) if (!useFAM(sub_entry))
{
#ifdef HAVE_INOTIFY #ifdef HAVE_INOTIFY
if (!useINotify(sub_entry )) if (!useINotify(sub_entry ))
#endif #endif
{
useStat(sub_entry); useStat(sub_entry);
}
}
} }
break; break;
} }

@ -237,11 +237,11 @@ cupsGetConf(void)
while ((bytes = while ((bytes =
#if CUPS_VERSION_MAJOR < 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 2) #if CUPS_VERSION_MAJOR < 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 2)
httpRead httpRead(cups_server, buffer, sizeof(buffer))
#else #else
httpRead2 httpRead2(cups_server, buffer, sizeof(buffer))
#endif #endif
(cups_server, buffer, sizeof(buffer))) > 0) ) > 0)
{ {
write(fd, buffer, bytes); write(fd, buffer, bytes);
} }
@ -341,21 +341,22 @@ cupsPutConf(const char *name) /* I - Name of the config file to send */
break; break;
} }
else else
{
#if CUPS_VERSION_MAJOR < 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 2) #if CUPS_VERSION_MAJOR < 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 2)
httpWrite httpWrite(cups_server, buffer, bytes);
#else #else
httpWrite2 httpWrite2(cups_server, buffer, bytes);
#endif #endif
(cups_server, buffer, bytes); }
if (status == HTTP_CONTINUE) if (status == HTTP_CONTINUE)
{ {
#if CUPS_VERSION_MAJOR < 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 2) #if CUPS_VERSION_MAJOR < 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 2)
httpWrite httpWrite(cups_server, buffer, 0);
#else #else
httpWrite2 httpWrite2(cups_server, buffer, 0);
#endif #endif
(cups_server, buffer, 0);
while ((status = httpUpdate(cups_server)) == HTTP_CONTINUE); while ((status = httpUpdate(cups_server)) == HTTP_CONTINUE);
} }

@ -103,7 +103,7 @@ void dumpRequest(ipp_t *req, bool answer = false, const TQString& s = TQString::
kdDebug(500) << s << endl; kdDebug(500) << s << endl;
attr = ippNextAttribute(req); attr = ippNextAttribute(req);
} }
#else // HAVE_CUPS_1_6 #else
kdDebug(500) << "State = 0x" << TQString::number(req->state, 16) << endl; kdDebug(500) << "State = 0x" << TQString::number(req->state, 16) << endl;
kdDebug(500) << "ID = 0x" << TQString::number(req->request.status.request_id, 16) << endl; kdDebug(500) << "ID = 0x" << TQString::number(req->request.status.request_id, 16) << endl;
if (answer) if (answer)
@ -152,7 +152,7 @@ void dumpRequest(ipp_t *req, bool answer = false, const TQString& s = TQString::
kdDebug(500) << s << endl; kdDebug(500) << s << endl;
attr = attr->next; attr = attr->next;
} }
#endif // HAVE_CUPS_1_6 #endif
} }
TQString errorString(int status) TQString errorString(int status)
@ -258,9 +258,9 @@ void IppRequest::addIntegerList_p(int group, int type, const TQString& name, con
for (TQValueList<int>::ConstIterator it=values.begin(); it != values.end(); ++it, i++) for (TQValueList<int>::ConstIterator it=values.begin(); it != values.end(); ++it, i++)
#ifdef HAVE_CUPS_1_6 #ifdef HAVE_CUPS_1_6
ippSetInteger(request_, &attr, i, *it); ippSetInteger(request_, &attr, i, *it);
#else // HAVE_CUPS_1_6 #else
attr->values[i].integer = *it; 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<b
for (TQValueList<bool>::ConstIterator it=values.begin(); it != values.end(); ++it, i++) for (TQValueList<bool>::ConstIterator it=values.begin(); it != values.end(); ++it, i++)
#ifdef HAVE_CUPS_1_6 #ifdef HAVE_CUPS_1_6
ippSetBoolean(request_, &attr, i, (char)(*it)); ippSetBoolean(request_, &attr, i, (char)(*it));
#else // HAVE_CUPS_1_6 #else
attr->values[i].boolean = (char)(*it); 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 #ifdef HAVE_CUPS_1_6
ippSetOperation(request_, (ipp_op_t)op); ippSetOperation(request_, (ipp_op_t)op);
ippSetRequestId(request_, 1); // 0 is not RFC-compliant, should be at least 1 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.operation_id = (ipp_op_t)op;
request_->request.op.request_id = 1; // 0 is not RFC-compliant, should be at least 1 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() int IppRequest::status()
{ {
#ifdef HAVE_CUPS_1_6 #ifdef HAVE_CUPS_1_6
return (request_ ? ippGetStatusCode(request_) : (connect_ ? cupsLastError() : -2)); return (request_ ? ippGetStatusCode(request_) : (connect_ ? cupsLastError() : -2));
#else // HAVE_CUPS_1_6 #else
return (request_ ? request_->request.status.status_code : (connect_ ? cupsLastError() : -2)); return (request_ ? request_->request.status.status_code : (connect_ ? cupsLastError() : -2));
#endif // HAVE_CUPS_1_6 #endif
} }
TQString IppRequest::statusMessage() TQString IppRequest::statusMessage()
@ -330,9 +330,9 @@ bool IppRequest::integerValue_p(const TQString& name, int& value, int type)
{ {
#ifdef HAVE_CUPS_1_6 #ifdef HAVE_CUPS_1_6
value = ippGetInteger(attr, 0); value = ippGetInteger(attr, 0);
#else // HAVE_CUPS_1_6 #else
value = attr->values[0].integer; value = attr->values[0].integer;
#endif // HAVE_CUPS_1_6 #endif
return true; return true;
} }
else return false; else return false;
@ -346,9 +346,9 @@ bool IppRequest::stringValue_p(const TQString& name, TQString& value, int type)
{ {
#ifdef HAVE_CUPS_1_6 #ifdef HAVE_CUPS_1_6
value = TQString::fromLocal8Bit(ippGetString(attr, 0, NULL)); value = TQString::fromLocal8Bit(ippGetString(attr, 0, NULL));
#else // HAVE_CUPS_1_6 #else
value = TQString::fromLocal8Bit(attr->values[0].string.text); value = TQString::fromLocal8Bit(attr->values[0].string.text);
#endif // HAVE_CUPS_1_6 #endif
return true; return true;
} }
else return false; else return false;
@ -364,10 +364,10 @@ bool IppRequest::stringListValue_p(const TQString& name, TQStringList& values, i
#ifdef HAVE_CUPS_1_6 #ifdef HAVE_CUPS_1_6
for (int i=0;i<ippGetCount(attr);i++) for (int i=0;i<ippGetCount(attr);i++)
values.append(TQString::fromLocal8Bit(ippGetString(attr, i, NULL))); values.append(TQString::fromLocal8Bit(ippGetString(attr, i, NULL)));
#else // HAVE_CUPS_1_6 #else
for (int i=0;i<attr->num_values;i++) for (int i=0;i<attr->num_values;i++)
values.append(TQString::fromLocal8Bit(attr->values[i].string.text)); values.append(TQString::fromLocal8Bit(attr->values[i].string.text));
#endif // HAVE_CUPS_1_6 #endif
return true; return true;
} }
else return false; else return false;
@ -381,9 +381,9 @@ bool IppRequest::boolean(const TQString& name, bool& value)
{ {
#ifdef HAVE_CUPS_1_6 #ifdef HAVE_CUPS_1_6
value = (bool)ippGetBoolean(attr, 0); value = (bool)ippGetBoolean(attr, 0);
#else // HAVE_CUPS_1_6 #else
value = (bool)attr->values[0].boolean; value = (bool)attr->values[0].boolean;
#endif // HAVE_CUPS_1_6 #endif
return true; return true;
} }
else return false; else return false;
@ -437,16 +437,16 @@ bool IppRequest::doFileRequest(const TQString& res, const TQString& filename)
/* No printers found */ /* No printers found */
#ifdef HAVE_CUPS_1_6 #ifdef HAVE_CUPS_1_6
if ( request_ && ippGetStatusCode(request_) == 0x406 ) if ( request_ && ippGetStatusCode(request_) == 0x406 )
#else // HAVE_CUPS_1_6 #else
if ( request_ && request_->request.status.status_code == 0x406 ) if ( request_ && request_->request.status.status_code == 0x406 )
#endif // HAVE_CUPS_1_6 #endif
return true; return true;
#ifdef HAVE_CUPS_1_6 #ifdef HAVE_CUPS_1_6
if (!request_ || ippGetState(request_) == IPP_ERROR || (ippGetStatusCode(request_) & 0x0F00)) 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)) if (!request_ || request_->state == IPP_ERROR || (request_->request.status.status_code & 0x0F00))
#endif // HAVE_CUPS_1_6 #endif
return false; return false;
@ -465,11 +465,11 @@ bool IppRequest::htmlReport(int group, TQTextStream& output)
ipp_attribute_t *attr = ippFirstAttribute(request_); ipp_attribute_t *attr = ippFirstAttribute(request_);
while (attr && ippGetGroupTag(attr) != group) while (attr && ippGetGroupTag(attr) != group)
attr = ippNextAttribute(request_); attr = ippNextAttribute(request_);
#else // HAVE_CUPS_1_6 #else
ipp_attribute_t *attr = request_->attrs; ipp_attribute_t *attr = request_->attrs;
while (attr && attr->group_tag != group) while (attr && attr->group_tag != group)
attr = attr->next; attr = attr->next;
#endif // HAVE_CUPS_1_6 #endif
// print each attribute // print each attribute
const ipp_uchar_t *d; const ipp_uchar_t *d;
TQCString dateStr; TQCString dateStr;
@ -542,7 +542,7 @@ bool IppRequest::htmlReport(int group, TQTextStream& output)
} }
output << "</td>\n </tr>" << endl; output << "</td>\n </tr>" << endl;
attr = ippNextAttribute(request_); attr = ippNextAttribute(request_);
#else // HAVE_CUPS_1_6 #else
while (attr && attr->group_tag == group) while (attr && attr->group_tag == group)
{ {
output << " <tr bgcolor=\"" << (bg ? "#ffffd9" : "#ffffff") << "\">\n <td><b>" << attr->name << "</b></td>\n <td>" << endl; output << " <tr bgcolor=\"" << (bg ? "#ffffd9" : "#ffffff") << "\">\n <td><b>" << attr->name << "</b></td>\n <td>" << endl;
@ -602,7 +602,7 @@ bool IppRequest::htmlReport(int group, TQTextStream& output)
} }
output << "</td>\n </tr>" << endl; output << "</td>\n </tr>" << endl;
attr = attr->next; attr = attr->next;
#endif // HAVE_CUPS_1_6 #endif
} }
// end table // end table
output << "</table>" << endl; output << "</table>" << endl;
@ -670,7 +670,7 @@ TQMap<TQString,TQString> IppRequest::toMap(int group)
value.truncate(value.length()-1); value.truncate(value.length()-1);
opts[TQString::fromLocal8Bit(ippGetName(attr))] = value; opts[TQString::fromLocal8Bit(ippGetName(attr))] = value;
attr = ippNextAttribute(request_); attr = ippNextAttribute(request_);
#else // HAVE_CUPS_1_6 #else
if (group != -1 && attr->group_tag != group) if (group != -1 && attr->group_tag != group)
{ {
attr = attr->next; attr = attr->next;
@ -719,7 +719,7 @@ TQMap<TQString,TQString> IppRequest::toMap(int group)
value.truncate(value.length()-1); value.truncate(value.length()-1);
opts[TQString::fromLocal8Bit(attr->name)] = value; opts[TQString::fromLocal8Bit(attr->name)] = value;
attr = attr->next; attr = attr->next;
#endif // HAVE_CUPS_1_6 #endif
} }
} }
return opts; return opts;
@ -780,7 +780,7 @@ void IppRequest::setMap(const TQMap<TQString,TQString>& opts)
#ifdef HAVE_CUPS_1_6 #ifdef HAVE_CUPS_1_6
ipp_attribute_t* IppRequest::first() ipp_attribute_t* IppRequest::first()
{ return (request_ ? ippFirstAttribute(request_) : NULL); } { return (request_ ? ippFirstAttribute(request_) : NULL); }
#else // HAVE_CUPS_1_6 #else
ipp_attribute_t* IppRequest::first() ipp_attribute_t* IppRequest::first()
{ return (request_ ? request_->attrs : NULL); } { return (request_ ? request_->attrs : NULL); }
#endif // HAVE_CUPS_1_6 #endif

@ -233,7 +233,7 @@ ichar_t * icharcpy P ((ichar_t * out, ichar_t * in));
int icharlen P ((ichar_t * str)); int icharlen P ((ichar_t * str));
int icharcmp P ((ichar_t * s1, ichar_t * s2)); int icharcmp P ((ichar_t * s1, ichar_t * s2));
int icharncmp P ((ichar_t * s1, ichar_t * s2, int n)); int icharncmp P ((ichar_t * s1, ichar_t * s2, int n));
#endif /* ICHAR_IS_CHAR */ #endif
/*static int has_marker;*/ /*static int has_marker;*/
@ -343,7 +343,7 @@ int ISpellChecker::addvheader ( struct dent *dp)
dp->flagfield |= (ALLCAPS | MOREVARIANTS); dp->flagfield |= (ALLCAPS | MOREVARIANTS);
return 0; return 0;
} }
#endif /* NO_CAPITALIZATION_SUPPORT */ #endif
/* /*
** Combine and resolve the entries describing two capitalizations of the same ** Combine and resolve the entries describing two capitalizations of the same
@ -500,7 +500,7 @@ ISpellChecker::stringcharlen (char *bufp, int canonical)
#ifdef SLOWMULTIPLY #ifdef SLOWMULTIPLY
static char * sp[MAXSTRINGCHARS]; static char * sp[MAXSTRINGCHARS];
static int inited = 0; static int inited = 0;
#endif /* SLOWMULTIPLY */ #endif
char * bufcur; char * bufcur;
char * stringcur; char * stringcur;
int stringno; int stringno;
@ -515,7 +515,7 @@ ISpellChecker::stringcharlen (char *bufp, int canonical)
for (stringno = 0; stringno < MAXSTRINGCHARS; stringno++) for (stringno = 0; stringno < MAXSTRINGCHARS; stringno++)
sp[stringno] = &hashheader.stringchars[stringno][0]; sp[stringno] = &hashheader.stringchars[stringno][0];
} }
#endif /* SLOWMULTIPLY */ #endif
lowstringno = 0; lowstringno = 0;
highstringno = m_hashheader.nstrchars - 1; highstringno = m_hashheader.nstrchars - 1;
dupwanted = canonical ? 0 : m_defdupchar; dupwanted = canonical ? 0 : m_defdupchar;
@ -524,17 +524,17 @@ ISpellChecker::stringcharlen (char *bufp, int canonical)
stringno = (lowstringno + highstringno) >> 1; stringno = (lowstringno + highstringno) >> 1;
#ifdef SLOWMULTIPLY #ifdef SLOWMULTIPLY
stringcur = sp[stringno]; stringcur = sp[stringno];
#else /* SLOWMULTIPLY */ #else
stringcur = &m_hashheader.stringchars[stringno][0]; stringcur = &m_hashheader.stringchars[stringno][0];
#endif /* SLOWMULTIPLY */ #endif
bufcur = bufp; bufcur = bufp;
while (*stringcur) while (*stringcur)
{ {
#ifdef NO8BIT #ifdef NO8BIT
if (((*bufcur++ ^ *stringcur) & 0x7F) != 0) if (((*bufcur++ ^ *stringcur) & 0x7F) != 0)
#else /* NO8BIT */ #else
if (*bufcur++ != *stringcur) if (*bufcur++ != *stringcur)
#endif /* NO8BIT */ #endif
break; break;
/* /*
** We can't use autoincrement above because of the ** 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]; m_laststringch = m_hashheader.stringdups[stringno];
#ifdef SLOWMULTIPLY #ifdef SLOWMULTIPLY
return stringcur - sp[stringno]; return stringcur - sp[stringno];
#else /* SLOWMULTIPLY */ #else
return stringcur - &m_hashheader.stringchars[stringno][0]; return stringcur - &m_hashheader.stringchars[stringno][0];
#endif /* SLOWMULTIPLY */ #endif
} }
else else
--stringcur; --stringcur;
@ -563,12 +563,12 @@ ISpellChecker::stringcharlen (char *bufp, int canonical)
highstringno = stringno - 1; highstringno = stringno - 1;
else if ((*bufcur & 0x7F) > (*stringcur & 0x7F)) else if ((*bufcur & 0x7F) > (*stringcur & 0x7F))
lowstringno = stringno + 1; lowstringno = stringno + 1;
#else /* NO8BIT */ #else
if (*--bufcur < *stringcur) if (*--bufcur < *stringcur)
highstringno = stringno - 1; highstringno = stringno - 1;
else if (*bufcur > *stringcur) else if (*bufcur > *stringcur)
lowstringno = stringno + 1; lowstringno = stringno + 1;
#endif /* NO8BIT */ #endif
else if (dupwanted < m_hashheader.dupnos[stringno]) else if (dupwanted < m_hashheader.dupnos[stringno])
highstringno = stringno - 1; highstringno = stringno - 1;
else else
@ -846,7 +846,7 @@ icharncmp (ichar_t *s1, ichar_t *s2, int n)
return *s1 - *s2; return *s1 - *s2;
} }
#endif /* ICHAR_IS_CHAR */ #endif
/* /*
* \param istate * \param istate

Loading…
Cancel
Save