diff options
Diffstat (limited to 'nsplugins')
27 files changed, 206 insertions, 204 deletions
diff --git a/nsplugins/README b/nsplugins/README index d465ddc24..769b3ee08 100644 --- a/nsplugins/README +++ b/nsplugins/README @@ -79,11 +79,11 @@ it can be resized, focused and unfocused with standard X11 functions as long as we know its' window ID. PluginPart gets a NSPluginInstance (from NSPluginLoader::newInstance), -which it sees as a regular QWidget. e.g. it can resize the QWidget and +which it sees as a regular TQWidget. e.g. it can resize the TQWidget and nspluginviewer's window will resize. This magic happens thanks to KJavaEmbed which NSPluginInstance inherits. -KJavaEmbed inherits QWidget and hooks up to QWidget's events, mapping +KJavaEmbed inherits TQWidget and hooks up to TQWidget's events, mapping those events to the appropriate X11 window operations. Resizing, focusing in and out is about all PluginPart could ever do with the nspluginviewer. diff --git a/nsplugins/kcm_nsplugins.cpp b/nsplugins/kcm_nsplugins.cpp index 037798cb2..c394afa8f 100644 --- a/nsplugins/kcm_nsplugins.cpp +++ b/nsplugins/kcm_nsplugins.cpp @@ -22,7 +22,7 @@ #include <tqregexp.h> #include <tqlayout.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tdelocale.h> #include <kiconloader.h> #include <tdefiledialog.h> @@ -34,7 +34,7 @@ #include <tdeapplication.h> #include <dcopclient.h> -#include <kprocio.h> +#include <tdeprocio.h> #include "plugin_paths.h" @@ -69,9 +69,9 @@ static bool checkSearchPathTimestamps( TQStringList paths, TQStringList timestam TQDateTime current = lastChanged( *it ); // store non-existent directory as "N" string rather than empty string, TDEConfig // has a bug with storing a list of empty items - if( *t == "N" ? !current.isNull() : current != TQDateTime::fromString( *t, Qt::ISODate )) + if( *t == "N" ? !current.isNull() : current != TQDateTime::fromString( *t, TQt::ISODate )) changed = true; - currentTimestamps.append( current.isNull() ? "N" : current.toString( Qt::ISODate )); + currentTimestamps.append( current.isNull() ? "N" : current.toString( TQt::ISODate )); } if( changed ) { @@ -86,7 +86,7 @@ static bool checkSearchPathTimestamps( TQStringList paths, TQStringList timestam extern "C" { - KDE_EXPORT void init_nsplugin() + TDE_EXPORT void init_nsplugin() { TDEConfig *config = new TDEConfig("kcmnspluginrc", true /* readonly */, false /* no globals*/); config->setGroup("Misc"); diff --git a/nsplugins/nspluginloader.cpp b/nsplugins/nspluginloader.cpp index 8c9e6fe2c..80634f72a 100644 --- a/nsplugins/nspluginloader.cpp +++ b/nsplugins/nspluginloader.cpp @@ -28,11 +28,11 @@ #include <tdeapplication.h> -#include <kprocess.h> +#include <tdeprocess.h> #include <kdebug.h> #include <tdeglobal.h> #include <tdelocale.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tdeconfig.h> #include <dcopclient.h> #include <dcopstub.h> @@ -69,7 +69,7 @@ void NSPluginInstance::init(const TQCString& app, const TQCString& obj) if (cfg.readBoolEntry("demandLoad", false)) { _button = new TQPushButton(i18n("Start Plugin"), dynamic_cast<EMBEDCLASS*>(this)); _layout->addWidget(_button, 0, 0); - connect(_button, TQT_SIGNAL(clicked()), this, TQT_SLOT(loadPlugin())); + connect(_button, TQ_SIGNAL(clicked()), this, TQ_SLOT(loadPlugin())); show(); } else { _button = 0L; @@ -80,7 +80,7 @@ void NSPluginInstance::init(const TQCString& app, const TQCString& obj) // and use 'resize_count' to wait for that one more resize to come (plus a timer // for a possible timeout). Only then flash is actually initialized ('inited' is true). resize_count = 1; - TQTimer::singleShot( 1000, this, TQT_SLOT( doLoadPlugin())); + TQTimer::singleShot( 1000, this, TQ_SLOT( doLoadPlugin())); } } @@ -201,10 +201,10 @@ NSPluginLoader::NSPluginLoader() _filetype.setAutoDelete(true); // trap dcop register events - kapp->dcopClient()->setNotifications(true); - TQObject::connect(kapp->dcopClient(), - TQT_SIGNAL(applicationRegistered(const TQCString&)), - this, TQT_SLOT(applicationRegistered(const TQCString&))); + tdeApp->dcopClient()->setNotifications(true); + TQObject::connect(tdeApp->dcopClient(), + TQ_SIGNAL(applicationRegistered(const TQCString&)), + this, TQ_SLOT(applicationRegistered(const TQCString&))); // load configuration TDEConfig cfg("kcmnspluginrc", false); @@ -272,7 +272,7 @@ void NSPluginLoader::scanPlugins() continue; } - TQStringList desc = TQStringList::split(':', line, TRUE); + TQStringList desc = TQStringList::split(':', line, true); TQString mime = desc[0].stripWhiteSpace(); TQStringList suffixes = TQStringList::split(',', desc[1].stripWhiteSpace()); if (!mime.isEmpty()) @@ -337,8 +337,8 @@ bool NSPluginLoader::loadViewer(const TQString &mimeType) int pid = (int)getpid(); _dcopid.sprintf("nspluginviewer-%d", pid); - connect( _process, TQT_SIGNAL(processExited(TDEProcess*)), - this, TQT_SLOT(processTerminated(TDEProcess*)) ); + connect( _process, TQ_SIGNAL(processExited(TDEProcess*)), + this, TQ_SLOT(processTerminated(TDEProcess*)) ); // find the external viewer process TQString viewer = TDEGlobal::dirs()->findExe("nspluginviewer"); @@ -376,9 +376,9 @@ bool NSPluginLoader::loadViewer(const TQString &mimeType) // wait for the process to run int cnt = 0; - while (!kapp->dcopClient()->isApplicationRegistered(_dcopid)) + while (!tdeApp->dcopClient()->isApplicationRegistered(_dcopid)) { - //kapp->processEvents(); // would lead to recursive calls in tdehtml + //tdeApp->processEvents(); // would lead to recursive calls in tdehtml #ifdef HAVE_USLEEP usleep( 50*1000 ); #else @@ -524,5 +524,3 @@ NSPluginInstance *NSPluginLoader::newInstance(TQWidget *parent, TQString url, return plugin; } - -// vim: ts=4 sw=4 et diff --git a/nsplugins/nspluginloader.h b/nsplugins/nspluginloader.h index 988697848..a0c55c00a 100644 --- a/nsplugins/nspluginloader.h +++ b/nsplugins/nspluginloader.h @@ -45,7 +45,7 @@ class TQGridLayout; class NSPluginInstance : public EMBEDCLASS { - Q_OBJECT + TQ_OBJECT public: NSPluginInstance(TQWidget *parent); @@ -80,7 +80,7 @@ private: // wrappers class NSPluginLoader : public TQObject { - Q_OBJECT + TQ_OBJECT public: NSPluginLoader(); diff --git a/nsplugins/plugin_part.cpp b/nsplugins/plugin_part.cpp index 99cbc780f..500361464 100644 --- a/nsplugins/plugin_part.cpp +++ b/nsplugins/plugin_part.cpp @@ -217,7 +217,7 @@ PluginPart::PluginPart(TQWidget *parentWidget, const char *widgetName, TQObject // Only create this if we have no parent since the parent part is // responsible for "Save As" then if (!parent || !parent->inherits("Part")) { - new TDEAction(i18n("&Save As..."), CTRL+Key_S, this, TQT_SLOT(saveAs()), actionCollection(), "saveDocument"); + new TDEAction(i18n("&Save As..."), CTRL+Key_S, this, TQ_SLOT(saveAs()), actionCollection(), "saveDocument"); setXMLFile("nspluginpart.rc"); } @@ -228,12 +228,12 @@ PluginPart::PluginPart(TQWidget *parentWidget, const char *widgetName, TQObject // create a canvas to insert our widget _canvas = new PluginCanvasWidget( parentWidget, widgetName ); //_canvas->setFocusPolicy( TQWidget::ClickFocus ); - _canvas->setFocusPolicy( TQ_WheelFocus ); + _canvas->setFocusPolicy( TQWidget::WheelFocus ); _canvas->setBackgroundMode( TQWidget::NoBackground ); setWidget(_canvas); _canvas->show(); - TQObject::connect( _canvas, TQT_SIGNAL(resized(int,int)), - this, TQT_SLOT(pluginResized(int,int)) ); + TQObject::connect( _canvas, TQ_SIGNAL(resized(int,int)), + this, TQ_SLOT(pluginResized(int,int)) ); } @@ -301,7 +301,7 @@ bool PluginPart::openURL(const KURL &url) emit setStatusBarText( i18n("Loading Netscape plugin for %1").arg(url.prettyURL()) ); // create plugin widget - NSPluginInstance *inst = _loader->newInstance(_canvas, surl, smime, embed, argn, argv, kapp->dcopClient()->appId(), _callback->objId(), reload, post, _extension->urlArgs().postData); + NSPluginInstance *inst = _loader->newInstance(_canvas, surl, smime, embed, argn, argv, tdeApp->dcopClient()->appId(), _callback->objId(), reload, post, _extension->urlArgs().postData); if ( inst ) { _widget = inst; diff --git a/nsplugins/plugin_part.h b/nsplugins/plugin_part.h index f3fa68984..e124aabd0 100644 --- a/nsplugins/plugin_part.h +++ b/nsplugins/plugin_part.h @@ -61,7 +61,7 @@ private: class PluginFactory : public KParts::Factory { - Q_OBJECT + TQ_OBJECT public: PluginFactory(); @@ -84,7 +84,7 @@ private: class PluginCanvasWidget : public TQWidget { - Q_OBJECT + TQ_OBJECT public: PluginCanvasWidget(TQWidget *parent=0, const char *name=0) @@ -100,7 +100,7 @@ signals: class PluginPart: public KParts::ReadOnlyPart { - Q_OBJECT + TQ_OBJECT public: PluginPart(TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name, const TQStringList &args = TQStringList()); @@ -137,7 +137,7 @@ private: class PluginLiveConnectExtension : public KParts::LiveConnectExtension { -Q_OBJECT +TQ_OBJECT public: PluginLiveConnectExtension(PluginPart* part); virtual ~PluginLiveConnectExtension(); diff --git a/nsplugins/pluginscan.cpp b/nsplugins/pluginscan.cpp index 8e08178be..8ea6b1ffb 100644 --- a/nsplugins/pluginscan.cpp +++ b/nsplugins/pluginscan.cpp @@ -43,11 +43,11 @@ #include <tdeapplication.h> #include <kdebug.h> #include <tdeglobal.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <klibloader.h> #include <tdeconfig.h> -#include <kcrash.h> -#include <kdesktopfile.h> +#include <tdecrash.h> +#include <tdedesktopfile.h> #include <kservicetype.h> #include <kmimetype.h> #include <tdecmdlineargs.h> @@ -112,7 +112,7 @@ TDEConfig *infoConfig = 0; bool isPluginMimeType( TQString fname ) { - KDesktopFile cfg( fname, true ); + TDEDesktopFile cfg( fname, true ); cfg.setDesktopGroup(); return cfg.hasKey( "X-TDE-nsplugin" ); } @@ -415,7 +415,7 @@ void scanDirectory( TQString dir, TQStringList &mimeInfoList, } // write into type cache - TQStringList tokens = TQStringList::split(':', *type, TRUE); + TQStringList tokens = TQStringList::split(':', *type, true); TQStringList::Iterator token; token = tokens.begin(); cache << (*token).lower(); @@ -653,7 +653,7 @@ int main( int argc, char **argv ) printf("90\n"); fflush(stdout); } - DCOPClient *dcc = kapp->dcopClient(); + DCOPClient *dcc = tdeApp->dcopClient(); if ( !dcc->isAttached() ) dcc->attach(); // Tel kded to update sycoca database. diff --git a/nsplugins/sdk/jni_md.h b/nsplugins/sdk/jni_md.h index c0aa11159..6ab327cd3 100644 --- a/nsplugins/sdk/jni_md.h +++ b/nsplugins/sdk/jni_md.h @@ -1,4 +1,4 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +/* * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -63,9 +63,9 @@ * WHAT'S UP WITH THIS FILE? * * This is where we define the mystical JNI_PUBLIC_API macro that works on all - * platforms. If you're running with Visual C++, Symantec C, or Borland's + * platforms. If you're running with Visual C++ or Symantec C * development environment on the PC, you're all set. Or if you're on the Mac - * with Metrowerks, Symantec or MPW with SC you're ok too. For UNIX it shouldn't + * with Symantec or MPW with SC you're ok too. For UNIX it shouldn't * matter. * Changes by sailesh on 9/26 @@ -132,18 +132,6 @@ # define JNICALL __export # endif /* !WINDLL */ # endif /* !_WIN32 */ -# elif defined(__BORLANDC__) -# if defined(WIN32) || defined(_WIN32) -# define JNI_PUBLIC_API(ResultType) __export ResultType -# define JNI_PUBLIC_VAR(VarType) VarType -# define JNI_NATIVE_STUB(ResultType) __export ResultType -# define JNICALL -# else /* !_WIN32 */ -# define JNI_PUBLIC_API(ResultType) ResultType _cdecl _export _loadds -# define JNI_PUBLIC_VAR(VarType) VarType -# define JNI_NATIVE_STUB(ResultType) ResultType _cdecl _loadds -# define JNICALL _loadds -# endif # else # error Unsupported PC development environment. # endif @@ -156,19 +144,7 @@ /* Mac */ #elif defined(macintosh) || defined(Macintosh) || defined(THINK_C) -# if defined(__MWERKS__) /* Metrowerks */ -# if !__option(enumsalwaysint) -# error You need to define 'Enums Always Int' for your project. -# endif -# if defined(TARGET_CPU_68K) && !TARGET_RT_MAC_CFM -# if !__option(fourbyteints) -# error You need to define 'Struct Alignment: 68k' for your project. -# endif -# endif /* !GENERATINGCFM */ -# define JNI_PUBLIC_API(ResultType) __declspec(export) ResultType -# define JNI_PUBLIC_VAR(VarType) JNI_PUBLIC_API(VarType) -# define JNI_NATIVE_STUB(ResultType) JNI_PUBLIC_API(ResultType) -# elif defined(__SC__) /* Symantec */ +# if defined(__SC__) /* Symantec */ # error What are the Symantec defines? (warren@netscape.com) # elif macintosh && applec /* MPW */ # error Please upgrade to the latest MPW compiler (SC). diff --git a/nsplugins/sdk/jri.h b/nsplugins/sdk/jri.h index f29945b94..d80654f6b 100644 --- a/nsplugins/sdk/jri.h +++ b/nsplugins/sdk/jri.h @@ -1,4 +1,3 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: NPL 1.1/GPL 2.0/LGPL 2.1 * diff --git a/nsplugins/sdk/jri_md.h b/nsplugins/sdk/jri_md.h index 5ae741ed3..3faf842dc 100644 --- a/nsplugins/sdk/jri_md.h +++ b/nsplugins/sdk/jri_md.h @@ -1,4 +1,3 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: NPL 1.1/GPL 2.0/LGPL 2.1 * @@ -53,9 +52,9 @@ extern "C" { * WHAT'S UP WITH THIS FILE? * * This is where we define the mystical JRI_PUBLIC_API macro that works on all - * platforms. If you're running with Visual C++, Symantec C, or Borland's + * platforms. If you're running with Visual C++ or Symantec C * development environment on the PC, you're all set. Or if you're on the Mac - * with Metrowerks, Symantec or MPW with SC you're ok too. For UNIX it shouldn't + * with Symantec or MPW with SC you're ok too. For UNIX it shouldn't * matter. * * On UNIX though you probably care about a couple of other symbols though: @@ -106,22 +105,6 @@ extern "C" { # define JRI_CALLBACK __export # endif /* !WINDLL */ # endif /* !_WIN32 */ -# elif defined(__BORLANDC__) -# if defined(WIN32) || defined(_WIN32) -# define JRI_PUBLIC_API(ResultType) __export ResultType -# define JRI_PUBLIC_VAR(VarType) VarType -# define JRI_PUBLIC_VAR_EXP(VarType) __export VarType -# define JRI_PUBLIC_VAR_IMP(VarType) __import VarType -# define JRI_NATIVE_STUB(ResultType) __export ResultType -# define JRI_CALLBACK -# else /* !_WIN32 */ -# define JRI_PUBLIC_API(ResultType) ResultType _cdecl _export _loadds -# define JRI_PUBLIC_VAR(VarType) VarType -# define JRI_PUBLIC_VAR_EXP(VarType) __cdecl __export VarType -# define JRI_PUBLIC_VAR_IMP(VarType) __cdecl __import VarType -# define JRI_NATIVE_STUB(ResultType) ResultType _cdecl _loadds -# define JRI_CALLBACK _loadds -# endif # else # error Unsupported PC development environment. # endif @@ -131,21 +114,7 @@ extern "C" { /* Mac */ #elif defined (macintosh) || defined(Macintosh) || defined(THINK_C) -# if defined(__MWERKS__) /* Metrowerks */ -# if !__option(enumsalwaysint) -# error You need to define 'Enums Always Int' for your project. -# endif -# if defined(TARGET_CPU_68K) && !TARGET_RT_MAC_CFM -# if !__option(fourbyteints) -# error You need to define 'Struct Alignment: 68k' for your project. -# endif -# endif /* !GENERATINGCFM */ -# define JRI_PUBLIC_API(ResultType) __declspec(export) ResultType -# define JRI_PUBLIC_VAR(VarType) JRI_PUBLIC_API(VarType) -# define JRI_PUBLIC_VAR_EXP(VarType) JRI_PUBLIC_API(VarType) -# define JRI_PUBLIC_VAR_IMP(VarType) JRI_PUBLIC_API(VarType) -# define JRI_NATIVE_STUB(ResultType) JRI_PUBLIC_API(ResultType) -# elif defined(__SC__) /* Symantec */ +# if defined(__SC__) /* Symantec */ # error What are the Symantec defines? (warren@netscape.com) # elif macintosh && applec /* MPW */ # error Please upgrade to the latest MPW compiler (SC). @@ -209,16 +178,7 @@ typedef long jint; #ifdef HAVE_LONG_LONG -#ifdef OSF1 - -/* long is default 64-bit on OSF1, -std1 does not allow long long */ -typedef long jlong; -typedef unsigned long julong; -#define jlong_MAXINT 0x7fffffffffffffffL -#define jlong_MININT 0x8000000000000000L -#define jlong_ZERO 0x0L - -#elif (defined(WIN32) || defined(_WIN32)) +#if (defined(WIN32) || defined(_WIN32)) typedef LONGLONG jlong; typedef DWORDLONG julong; diff --git a/nsplugins/sdk/jritypes.h b/nsplugins/sdk/jritypes.h index ddeb6331c..ed7769be7 100644 --- a/nsplugins/sdk/jritypes.h +++ b/nsplugins/sdk/jritypes.h @@ -1,4 +1,3 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: NPL 1.1/GPL 2.0/LGPL 2.1 * diff --git a/nsplugins/sdk/npapi.h b/nsplugins/sdk/npapi.h index 16c71b97a..92ccc6e60 100644 --- a/nsplugins/sdk/npapi.h +++ b/nsplugins/sdk/npapi.h @@ -1,4 +1,3 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: NPL 1.1/GPL 2.0/LGPL 2.1 * @@ -93,21 +92,6 @@ # endif /* XP_WIN */ #endif /* _WINDOWS */ -#ifdef __MWERKS__ -# define _declspec __declspec -# ifdef macintosh -# ifndef XP_MAC -# define XP_MAC 1 -# endif /* XP_MAC */ -# endif /* macintosh */ -# ifdef __INTEL__ -# undef NULL -# ifndef XP_WIN -# define XP_WIN 1 -# endif /* XP_WIN */ -# endif /* __INTEL__ */ -#endif /* __MWERKS__ */ - #if defined(XP_MAC) || defined(XP_MACOSX) #include <Quickdraw.h> #include <Events.h> diff --git a/nsplugins/sdk/npruntime.h b/nsplugins/sdk/npruntime.h index 45f3f0a9a..b5d656352 100644 --- a/nsplugins/sdk/npruntime.h +++ b/nsplugins/sdk/npruntime.h @@ -1,4 +1,3 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * Copyright � 2004, Apple Computer, Inc. and The Mozilla Foundation. * All rights reserved. diff --git a/nsplugins/sdk/npupp.h b/nsplugins/sdk/npupp.h index dff545d9f..769897dc6 100644 --- a/nsplugins/sdk/npupp.h +++ b/nsplugins/sdk/npupp.h @@ -1,4 +1,3 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * diff --git a/nsplugins/sdk/obsolete/protypes.h b/nsplugins/sdk/obsolete/protypes.h index e96cfcf67..5d9190aa2 100644 --- a/nsplugins/sdk/obsolete/protypes.h +++ b/nsplugins/sdk/obsolete/protypes.h @@ -1,4 +1,3 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* * The contents of this file are subject to the Mozilla Public * License Version 1.1 (the "License"); you may not use this file diff --git a/nsplugins/sdk/prcpucfg.h b/nsplugins/sdk/prcpucfg.h index a8dd53fa1..71fd9f658 100644 --- a/nsplugins/sdk/prcpucfg.h +++ b/nsplugins/sdk/prcpucfg.h @@ -1,4 +1,3 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * @@ -650,6 +649,98 @@ #define PR_BYTES_PER_WORD_LOG2 3 #define PR_BYTES_PER_DWORD_LOG2 3 +#elif defined(__riscv) && (__riscv_xlen == 32) + +#undef IS_BIG_ENDIAN +#define IS_LITTLE_ENDIAN 1 +#undef IS_64 + +#define PR_BYTES_PER_BYTE 1 +#define PR_BYTES_PER_SHORT 2 +#define PR_BYTES_PER_INT 4 +#define PR_BYTES_PER_INT64 8 +#define PR_BYTES_PER_LONG 4 +#define PR_BYTES_PER_FLOAT 4 +#define PR_BYTES_PER_DOUBLE 8 +#define PR_BYTES_PER_WORD 4 +#define PR_BYTES_PER_DWORD 8 + +#define PR_BITS_PER_BYTE 8 +#define PR_BITS_PER_SHORT 16 +#define PR_BITS_PER_INT 32 +#define PR_BITS_PER_INT64 64 +#define PR_BITS_PER_LONG 32 +#define PR_BITS_PER_FLOAT 32 +#define PR_BITS_PER_DOUBLE 64 +#define PR_BITS_PER_WORD 32 + +#define PR_BITS_PER_BYTE_LOG2 3 +#define PR_BITS_PER_SHORT_LOG2 4 +#define PR_BITS_PER_INT_LOG2 5 +#define PR_BITS_PER_INT64_LOG2 6 +#define PR_BITS_PER_LONG_LOG2 5 +#define PR_BITS_PER_FLOAT_LOG2 5 +#define PR_BITS_PER_DOUBLE_LOG2 6 +#define PR_BITS_PER_WORD_LOG2 5 + +#define PR_ALIGN_OF_SHORT 2 +#define PR_ALIGN_OF_INT 4 +#define PR_ALIGN_OF_LONG 4 +#define PR_ALIGN_OF_INT64 8 +#define PR_ALIGN_OF_FLOAT 4 +#define PR_ALIGN_OF_DOUBLE 8 +#define PR_ALIGN_OF_POINTER 4 +#define PR_ALIGN_OF_WORD 4 + +#define PR_BYTES_PER_WORD_LOG2 2 +#define PR_BYTES_PER_DWORD_LOG2 3 + +#elif defined(__riscv) && (__riscv_xlen == 64) + +#undef IS_BIG_ENDIAN +#define IS_LITTLE_ENDIAN 1 +#define IS_64 + +#define PR_BYTES_PER_BYTE 1 +#define PR_BYTES_PER_SHORT 2 +#define PR_BYTES_PER_INT 4 +#define PR_BYTES_PER_INT64 8 +#define PR_BYTES_PER_LONG 8 +#define PR_BYTES_PER_FLOAT 4 +#define PR_BYTES_PER_DOUBLE 8 +#define PR_BYTES_PER_WORD 8 +#define PR_BYTES_PER_DWORD 8 + +#define PR_BITS_PER_BYTE 8 +#define PR_BITS_PER_SHORT 16 +#define PR_BITS_PER_INT 32 +#define PR_BITS_PER_INT64 64 +#define PR_BITS_PER_LONG 64 +#define PR_BITS_PER_FLOAT 32 +#define PR_BITS_PER_DOUBLE 64 +#define PR_BITS_PER_WORD 64 + +#define PR_BITS_PER_BYTE_LOG2 3 +#define PR_BITS_PER_SHORT_LOG2 4 +#define PR_BITS_PER_INT_LOG2 5 +#define PR_BITS_PER_INT64_LOG2 6 +#define PR_BITS_PER_LONG_LOG2 6 +#define PR_BITS_PER_FLOAT_LOG2 5 +#define PR_BITS_PER_DOUBLE_LOG2 6 +#define PR_BITS_PER_WORD_LOG2 6 + +#define PR_ALIGN_OF_SHORT 2 +#define PR_ALIGN_OF_INT 4 +#define PR_ALIGN_OF_LONG 8 +#define PR_ALIGN_OF_INT64 8 +#define PR_ALIGN_OF_FLOAT 4 +#define PR_ALIGN_OF_DOUBLE 8 +#define PR_ALIGN_OF_POINTER 8 +#define PR_ALIGN_OF_WORD 8 + +#define PR_BYTES_PER_WORD_LOG2 3 +#define PR_BYTES_PER_DWORD_LOG2 3 + #else #error "Unknown CPU architecture" diff --git a/nsplugins/sdk/prtypes.h b/nsplugins/sdk/prtypes.h index b68361082..842013ee8 100644 --- a/nsplugins/sdk/prtypes.h +++ b/nsplugins/sdk/prtypes.h @@ -1,4 +1,3 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* * The contents of this file are subject to the Mozilla Public * License Version 1.1 (the "License"); you may not use this file diff --git a/nsplugins/test/testnsplugin.cpp b/nsplugins/test/testnsplugin.cpp index daccd1bcf..821f17e29 100644 --- a/nsplugins/test/testnsplugin.cpp +++ b/nsplugins/test/testnsplugin.cpp @@ -44,9 +44,9 @@ TestNSPlugin::TestNSPlugin() m_layout = new TQHBoxLayout( m_client ); // file menu - KStdAction::openNew( this, TQT_SLOT(newView()), actionCollection()); - KStdAction::close( this, TQT_SLOT(closeView()), actionCollection()); - KStdAction::quit( kapp, TQT_SLOT(quit()), actionCollection()); + KStdAction::openNew( this, TQ_SLOT(newView()), actionCollection()); + KStdAction::close( this, TQ_SLOT(closeView()), actionCollection()); + KStdAction::quit( tdeApp, TQ_SLOT(quit()), actionCollection()); createGUI( "testnspluginui.rc" ); } @@ -88,8 +88,8 @@ void TestNSPlugin::newView() if ( win ) { m_plugins.append( win ); - connect( win, TQT_SIGNAL(destroyed(NSPluginInstance *)), - this, TQT_SLOT(viewDestroyed(NSPluginInstance *)) ); + connect( win, TQ_SIGNAL(destroyed(NSPluginInstance *)), + this, TQ_SLOT(viewDestroyed(NSPluginInstance *)) ); m_layout->addWidget( win ); win->show(); } else diff --git a/nsplugins/test/testnsplugin.h b/nsplugins/test/testnsplugin.h index 252cea2c8..3c1b2bdc3 100644 --- a/nsplugins/test/testnsplugin.h +++ b/nsplugins/test/testnsplugin.h @@ -34,7 +34,7 @@ class NSPluginInstance; class TestNSPlugin : public TDEMainWindow { - Q_OBJECT + TQ_OBJECT public: TestNSPlugin(); diff --git a/nsplugins/viewer/CMakeLists.txt b/nsplugins/viewer/CMakeLists.txt index 08a3778d7..48a71ed80 100644 --- a/nsplugins/viewer/CMakeLists.txt +++ b/nsplugins/viewer/CMakeLists.txt @@ -31,6 +31,6 @@ tde_add_executable( nspluginviewer AUTOMOC ../NSPluginCallbackIface.stub NSPluginClassIface.skel nsplugin.cpp viewer.cpp qxteventloop.cpp glibevents.cpp - LINK tdeparts-shared tdeio-shared ${GLIB2_LIBRARIES} Xt ${DL_LIBRARIES} + LINK tdeparts-shared tdeio-shared ${GLIB2_LIBRARIES} Xt ${CMAKE_DL_LIBS} DESTINATION ${BIN_INSTALL_DIR} ) diff --git a/nsplugins/viewer/glibevents.cpp b/nsplugins/viewer/glibevents.cpp index fe059d1ee..e8bc766a1 100644 --- a/nsplugins/viewer/glibevents.cpp +++ b/nsplugins/viewer/glibevents.cpp @@ -24,7 +24,7 @@ GlibEvents::GlibEvents() { g_main_context_ref( g_main_context_default()); - connect( &timer, TQT_SIGNAL( timeout()), TQT_SLOT( process())); + connect( &timer, TQ_SIGNAL( timeout()), TQ_SLOT( process())); // TODO Poll for now timer.start( 10 ); } diff --git a/nsplugins/viewer/glibevents.h b/nsplugins/viewer/glibevents.h index 396273a85..379fc4722 100644 --- a/nsplugins/viewer/glibevents.h +++ b/nsplugins/viewer/glibevents.h @@ -26,9 +26,9 @@ #include <glib.h> class GlibEvents - : public QWidget + : public TQWidget { - Q_OBJECT + TQ_OBJECT public: GlibEvents(); virtual ~GlibEvents(); diff --git a/nsplugins/viewer/nsplugin.cpp b/nsplugins/viewer/nsplugin.cpp index 4f3cb3094..5a873c45d 100644 --- a/nsplugins/viewer/nsplugin.cpp +++ b/nsplugins/viewer/nsplugin.cpp @@ -49,9 +49,9 @@ #include <tdeio/netaccess.h> #include <klibloader.h> #include <tdelocale.h> -#include <kprocess.h> +#include <tdeprocess.h> #include <tdeprotocolmanager.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tdetempfile.h> #include <kurl.h> @@ -616,7 +616,7 @@ NSPluginInstance::NSPluginInstance(NPP privateData, NPPluginFuncs *pluginFuncs, memcpy(&_pluginFuncs, pluginFuncs, sizeof(_pluginFuncs)); _timer = new TQTimer( this ); - connect( _timer, TQT_SIGNAL(timeout()), TQT_SLOT(timer()) ); + connect( _timer, TQ_SIGNAL(timeout()), TQ_SLOT(timer()) ); kdDebug(1431) << "NSPluginInstance::NSPluginInstance" << endl; kdDebug(1431) << "pdata = " << _npp->pdata << endl; @@ -809,8 +809,8 @@ void NSPluginInstance::timer() if (req.post) { // create stream NSPluginStream *s = new NSPluginStream( this ); - connect( s, TQT_SIGNAL(finished(NSPluginStreamBase*)), - TQT_SLOT(streamFinished(NSPluginStreamBase*)) ); + connect( s, TQ_SIGNAL(finished(NSPluginStreamBase*)), + TQ_SLOT(streamFinished(NSPluginStreamBase*)) ); _streams.append( s ); kdDebug() << "posting to " << url << endl; @@ -828,8 +828,8 @@ void NSPluginInstance::timer() } else { // create stream NSPluginStream *s = new NSPluginStream( this ); - connect( s, TQT_SIGNAL(finished(NSPluginStreamBase*)), - TQT_SLOT(streamFinished(NSPluginStreamBase*)) ); + connect( s, TQ_SIGNAL(finished(NSPluginStreamBase*)), + TQ_SLOT(streamFinished(NSPluginStreamBase*)) ); _streams.append( s ); kdDebug() << "getting " << url << endl; @@ -1026,8 +1026,8 @@ void NSPluginInstance::javascriptResult(TQ_INT32 id, TQString result) { Request *req = i.data(); _jsrequests.remove( i ); NSPluginStream *s = new NSPluginStream( this ); - connect( s, TQT_SIGNAL(finished(NSPluginStreamBase*)), - TQT_SLOT(streamFinished(NSPluginStreamBase*)) ); + connect( s, TQ_SIGNAL(finished(NSPluginStreamBase*)), + TQ_SLOT(streamFinished(NSPluginStreamBase*)) ); _streams.append( s ); int len = result.length(); @@ -1233,7 +1233,7 @@ void NSPluginInstance::gotFocusOut() // Prevent plugins from polling the keyboard regardless of focus. static int (*real_xquerykeymap)( Display*, char[32] ) = NULL; -extern "C" KDE_EXPORT +extern "C" TDE_EXPORT int XQueryKeymap( Display* dpy, char k[32] ) { if( real_xquerykeymap == NULL ) @@ -1254,9 +1254,9 @@ NSPluginViewer::NSPluginViewer( TQCString dcopId, { _classes.setAutoDelete( true ); connect(TDEApplication::dcopClient(), - TQT_SIGNAL(applicationRemoved(const TQCString&)), + TQ_SIGNAL(applicationRemoved(const TQCString&)), this, - TQT_SLOT(appUnregistered(const TQCString&))); + TQ_SLOT(appUnregistered(const TQCString&))); } @@ -1323,7 +1323,7 @@ DCOPRef NSPluginViewer::newClass( TQString plugin ) _classes.insert( plugin, cls ); } - return DCOPRef( kapp->dcopClient()->appId(), cls->objId() ); + return DCOPRef( tdeApp->dcopClient()->appId(), cls->objId() ); } @@ -1348,7 +1348,7 @@ NSPluginClass::NSPluginClass( const TQString &library, _NP_Shutdown = 0; _timer = new TQTimer( this ); - connect( _timer, TQT_SIGNAL(timeout()), TQT_SLOT(timer()) ); + connect( _timer, TQ_SIGNAL(timeout()), TQ_SLOT(timer()) ); // check lib handle if (!_handle) { @@ -1566,7 +1566,7 @@ DCOPRef NSPluginClass::newInstance( TQString url, TQString mimeType, TQ_INT8 emb } _instances.append( inst ); - return DCOPRef(kapp->dcopClient()->appId(), inst->objId()); + return DCOPRef(tdeApp->dcopClient()->appId(), inst->objId()); } @@ -1574,7 +1574,7 @@ void NSPluginClass::destroyInstance( NSPluginInstance* inst ) { // mark for destruction _trash.append( inst ); - timer(); //_timer->start( 0, TRUE ); + timer(); //_timer->start( 0, true ); } /****************************************************************************/ @@ -1642,7 +1642,7 @@ void NSPluginStreamBase::inform() // stream into temporary file (use lower() in case the // filename as an upper case X in it) _tempFile = new KTempFile; - _tempFile->setAutoDelete( TRUE ); + _tempFile->setAutoDelete( true ); _fileURL = _tempFile->name(); kdDebug() << "saving into " << _fileURL << endl; } @@ -1832,7 +1832,7 @@ NSPluginBufStream::NSPluginBufStream( class NSPluginInstance *instance ) : NSPluginStreamBase( instance ) { _timer = new TQTimer( this ); - connect( _timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timer()) ); + connect( _timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(timer()) ); } @@ -1878,7 +1878,7 @@ NSPluginStream::NSPluginStream( NSPluginInstance *instance ) : NSPluginStreamBase( instance ), _job(0) { _resumeTimer = new TQTimer( this ); - connect(_resumeTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(resume())); + connect(_resumeTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(resume())); } @@ -1902,15 +1902,15 @@ bool NSPluginStream::get( const TQString& url, const TQString& mimeType, if (reload) { _job->addMetaData("cache", "reload"); } - connect(_job, TQT_SIGNAL(data(TDEIO::Job *, const TQByteArray &)), - TQT_SLOT(data(TDEIO::Job *, const TQByteArray &))); - connect(_job, TQT_SIGNAL(result(TDEIO::Job *)), TQT_SLOT(result(TDEIO::Job *))); - connect(_job, TQT_SIGNAL(totalSize(TDEIO::Job *, TDEIO::filesize_t )), - TQT_SLOT(totalSize(TDEIO::Job *, TDEIO::filesize_t))); - connect(_job, TQT_SIGNAL(mimetype(TDEIO::Job *, const TQString &)), - TQT_SLOT(mimetype(TDEIO::Job *, const TQString &))); - connect(_job, TQT_SIGNAL(redirection(TDEIO::Job *, const KURL&)), - TQT_SLOT(redirection(TDEIO::Job *, const KURL&))); + connect(_job, TQ_SIGNAL(data(TDEIO::Job *, const TQByteArray &)), + TQ_SLOT(data(TDEIO::Job *, const TQByteArray &))); + connect(_job, TQ_SIGNAL(result(TDEIO::Job *)), TQ_SLOT(result(TDEIO::Job *))); + connect(_job, TQ_SIGNAL(totalSize(TDEIO::Job *, TDEIO::filesize_t )), + TQ_SLOT(totalSize(TDEIO::Job *, TDEIO::filesize_t))); + connect(_job, TQ_SIGNAL(mimetype(TDEIO::Job *, const TQString &)), + TQ_SLOT(mimetype(TDEIO::Job *, const TQString &))); + connect(_job, TQ_SIGNAL(redirection(TDEIO::Job *, const KURL&)), + TQ_SLOT(redirection(TDEIO::Job *, const KURL&))); } return false; @@ -1928,15 +1928,15 @@ bool NSPluginStream::post( const TQString& url, const TQByteArray& data, _job->addMetaData("errorPage", "false"); _job->addMetaData("PropagateHttpHeader", "true"); _job->addMetaData("AllowCompressedPage", "false"); - connect(_job, TQT_SIGNAL(data(TDEIO::Job *, const TQByteArray &)), - TQT_SLOT(data(TDEIO::Job *, const TQByteArray &))); - connect(_job, TQT_SIGNAL(result(TDEIO::Job *)), TQT_SLOT(result(TDEIO::Job *))); - connect(_job, TQT_SIGNAL(totalSize(TDEIO::Job *, TDEIO::filesize_t )), - TQT_SLOT(totalSize(TDEIO::Job *, TDEIO::filesize_t))); - connect(_job, TQT_SIGNAL(mimetype(TDEIO::Job *, const TQString &)), - TQT_SLOT(mimetype(TDEIO::Job *, const TQString &))); - connect(_job, TQT_SIGNAL(redirection(TDEIO::Job *, const KURL&)), - TQT_SLOT(redirection(TDEIO::Job *, const KURL&))); + connect(_job, TQ_SIGNAL(data(TDEIO::Job *, const TQByteArray &)), + TQ_SLOT(data(TDEIO::Job *, const TQByteArray &))); + connect(_job, TQ_SIGNAL(result(TDEIO::Job *)), TQ_SLOT(result(TDEIO::Job *))); + connect(_job, TQ_SIGNAL(totalSize(TDEIO::Job *, TDEIO::filesize_t )), + TQ_SLOT(totalSize(TDEIO::Job *, TDEIO::filesize_t))); + connect(_job, TQ_SIGNAL(mimetype(TDEIO::Job *, const TQString &)), + TQ_SLOT(mimetype(TDEIO::Job *, const TQString &))); + connect(_job, TQ_SIGNAL(redirection(TDEIO::Job *, const KURL&)), + TQ_SLOT(redirection(TDEIO::Job *, const KURL&))); } return false; @@ -1949,7 +1949,7 @@ void NSPluginStream::data(TDEIO::Job * job, const TQByteArray &data) queue( data ); if ( !pump() ) { _job->suspend(); - _resumeTimer->start( 100, TRUE ); + _resumeTimer->start( 100, true ); } } @@ -1986,7 +1986,7 @@ void NSPluginStream::resume() _job->resume(); } else { kdDebug(1431) << "restart timer" << endl; - _resumeTimer->start( 100, TRUE ); + _resumeTimer->start( 100, true ); } } @@ -1999,4 +1999,3 @@ void NSPluginStream::result(TDEIO::Job *job) } #include "nsplugin.moc" -// vim: ts=4 sw=4 et diff --git a/nsplugins/viewer/nsplugin.h b/nsplugins/viewer/nsplugin.h index 96bb1da15..ead4a07e3 100644 --- a/nsplugins/viewer/nsplugin.h +++ b/nsplugins/viewer/nsplugin.h @@ -65,7 +65,7 @@ class TQTimer; class NSPluginStreamBase : public TQObject { -Q_OBJECT +TQ_OBJECT friend class NSPluginInstance; public: NSPluginStreamBase( class NSPluginInstance *instance ); @@ -115,7 +115,7 @@ private: class NSPluginStream : public NSPluginStreamBase { - Q_OBJECT + TQ_OBJECT public: NSPluginStream( class NSPluginInstance *instance ); @@ -140,7 +140,7 @@ protected: class NSPluginBufStream : public NSPluginStreamBase { - Q_OBJECT + TQ_OBJECT public: NSPluginBufStream( class NSPluginInstance *instance ); @@ -159,7 +159,7 @@ protected: class NSPluginInstance : public TQObject, public virtual NSPluginInstanceIface { - Q_OBJECT + TQ_OBJECT public: @@ -275,7 +275,7 @@ private: class NSPluginClass : public TQObject, virtual public NSPluginClassIface { - Q_OBJECT + TQ_OBJECT public: NSPluginClass( const TQString &library, TQObject *parent, const char *name=0 ); @@ -325,7 +325,7 @@ private: class NSPluginViewer : public TQObject, virtual public NSPluginViewerIface { - Q_OBJECT + TQ_OBJECT public: NSPluginViewer( TQCString dcopId, TQObject *parent, const char *name=0 ); virtual ~NSPluginViewer(); diff --git a/nsplugins/viewer/qxteventloop.cpp b/nsplugins/viewer/qxteventloop.cpp index 1f112ba08..b8b4329b2 100644 --- a/nsplugins/viewer/qxteventloop.cpp +++ b/nsplugins/viewer/qxteventloop.cpp @@ -93,8 +93,8 @@ bool QXtEventLoop::redeliverEvent( XEvent *event ) { // redeliver the event to Xt, NOT through Qt if ( static_d->dispatchers[ event->type ]( event ) ) - return TRUE; - return FALSE; + return true; + return false; } @@ -108,7 +108,7 @@ XEvent* QXtEventLoop::lastEvent() QXtEventLoopPrivate::QXtEventLoopPrivate() : appContext(NULL), ownContext(NULL), - activate_timers(FALSE), timerid(0) + activate_timers(false), timerid(0) { } @@ -181,18 +181,18 @@ Boolean qmotif_event_dispatcher( XEvent *event ) case EnterNotify: case LeaveNotify: event->xcrossing.focus = False; - delivered = FALSE; + delivered = false; break; case XKeyPress: case XKeyRelease: - delivered = TRUE; + delivered = true; break; case XFocusIn: case XFocusOut: - delivered = FALSE; + delivered = false; break; default: - delivered = FALSE; + delivered = false; break; } } @@ -412,7 +412,7 @@ void QXtEventLoop::unregisterSocketNotifier( TQSocketNotifier *notifier ) */ void qmotif_timeout_handler( XtPointer, XtIntervalId * ) { - static_d->activate_timers = TRUE; + static_d->activate_timers = true; static_d->timerid = 0; } @@ -461,7 +461,7 @@ bool QXtEventLoop::processEvents( ProcessEventsFlags flags ) if ( d->activate_timers ) { nevents += activateTimers(); } - d->activate_timers = FALSE; + d->activate_timers = false; return ( (flags & WaitForMore) || ( pendingmask != 0 ) || nevents > 0 ); } diff --git a/nsplugins/viewer/qxteventloop.h b/nsplugins/viewer/qxteventloop.h index 230c8a32c..55c5b8698 100644 --- a/nsplugins/viewer/qxteventloop.h +++ b/nsplugins/viewer/qxteventloop.h @@ -49,7 +49,7 @@ class QXtEventLoopPrivate; class QXtEventLoop : public TQEventLoop { - Q_OBJECT + TQ_OBJECT public: diff --git a/nsplugins/viewer/viewer.cpp b/nsplugins/viewer/viewer.cpp index 6007e5b0e..488168b4d 100644 --- a/nsplugins/viewer/viewer.cpp +++ b/nsplugins/viewer/viewer.cpp @@ -152,7 +152,7 @@ bool qt_set_socket_handler( int sockfd, int type, TQObject *obj, bool enable ) #if defined(CHECK_RANGE) tqWarning( "TQSocketNotifier: Internal error" ); #endif - return FALSE; + return false; } XtPointer inpMask = 0; @@ -161,7 +161,7 @@ bool qt_set_socket_handler( int sockfd, int type, TQObject *obj, bool enable ) case TQSocketNotifier::Read: inpMask = (XtPointer)XtInputReadMask; break; case TQSocketNotifier::Write: inpMask = (XtPointer)XtInputWriteMask; break; case TQSocketNotifier::Exception: inpMask = (XtPointer)XtInputExceptMask; break; - default: return FALSE; + default: return false; } if (enable) { @@ -197,13 +197,13 @@ bool qt_set_socket_handler( int sockfd, int type, TQObject *obj, bool enable ) while ( sn && !(sn->obj == obj && sn->fd == sockfd) ) sn = _notifiers[type].next(); if ( !sn ) // not found - return FALSE; + return false; XtRemoveInput( sn->id ); _notifiers[type].remove(); } - return TRUE; + return true; } #endif |