diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-10-06 17:29:49 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-10-06 17:29:49 +0900 |
commit | 587657561bb870d457a188a80bc0ce918ef5a0bd (patch) | |
tree | baed0c3b38c4d11389c96c686967160a1b3027cd /src | |
parent | 4161606c301841f973f0319f46e6853c4a3fe906 (diff) | |
download | tqt3-587657561bb870d457a188a80bc0ce918ef5a0bd.tar.gz tqt3-587657561bb870d457a188a80bc0ce918ef5a0bd.zip |
Rename moc to tqmoc
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src')
-rw-r--r-- | src/kernel/tqmetaobject.cpp | 8 | ||||
-rw-r--r-- | src/kernel/tqobject.cpp | 4 | ||||
-rw-r--r-- | src/kernel/tqobjectdefs.h | 2 | ||||
-rw-r--r-- | src/kernel/tqprocess_unix.cpp | 2 | ||||
-rw-r--r-- | src/kernel/tqt.h | 3 | ||||
-rw-r--r-- | src/kernel/tqvariant.cpp | 4 | ||||
-rw-r--r-- | src/tmp/README | 2 | ||||
-rw-r--r-- | src/tqmoc/README (renamed from src/moc/README) | 8 | ||||
-rw-r--r-- | src/tqmoc/tqmoc.l (renamed from src/moc/moc.l) | 12 | ||||
-rw-r--r-- | src/tqmoc/tqmoc.pro (renamed from src/moc/moc.pro) | 8 | ||||
-rw-r--r-- | src/tqmoc/tqmoc.y (renamed from src/moc/moc.y) | 94 | ||||
-rw-r--r-- | src/tqmoc/tqmoc_lex.cpp (renamed from src/moc/moc_lex.cpp) | 12 | ||||
-rw-r--r-- | src/tqmoc/tqmoc_yacc.cpp (renamed from src/moc/moc_yacc.cpp) | 524 | ||||
-rw-r--r-- | src/tqmoc/tqmoc_yacc.h (renamed from src/moc/moc_yacc.h) | 4 | ||||
-rw-r--r-- | src/widgets/tqtextedit.h | 2 |
15 files changed, 343 insertions, 346 deletions
diff --git a/src/kernel/tqmetaobject.cpp b/src/kernel/tqmetaobject.cpp index 06fd7c86f..4e5686295 100644 --- a/src/kernel/tqmetaobject.cpp +++ b/src/kernel/tqmetaobject.cpp @@ -109,7 +109,7 @@ The number of pairs is returned by numClassInfo(), and values are returned by classInfo(). - \sa \link moc.html moc (Meta Object Compiler)\endlink + \sa \link tqmoc.html tqmoc (Meta Object Compiler)\endlink */ @@ -118,7 +118,7 @@ The private object. *****************************************************************************/ -// extra flags from moc.y +// extra flags from tqmoc.y enum Flags { Invalid = 0x00000000, Readable = 0x00000001, @@ -660,7 +660,7 @@ const TQMetaProperty* TQMetaObject::resolveProperty( const TQMetaProperty* p ) c \overload - The version of resolveProperty that is used by moc generated code + The version of resolveProperty that is used by tqmoc generated code */ int TQMetaObject::resolveProperty( int index ) const @@ -1197,7 +1197,7 @@ bool TQMetaProperty::reset( TQObject* o ) const #endif // TQT_NO_PROPERTIES /* - * TQMetaObjectCleanUp is used as static global object in the moc-generated cpp + * TQMetaObjectCleanUp is used as static global object in the tqmoc-generated cpp * files and deletes the TQMetaObject provided with setMetaObject. It sets the * TQObject reference to the metaObj to NULL when it is destroyed. */ diff --git a/src/kernel/tqobject.cpp b/src/kernel/tqobject.cpp index 3c0b0f3ba..85c69f8ba 100644 --- a/src/kernel/tqobject.cpp +++ b/src/kernel/tqobject.cpp @@ -388,7 +388,7 @@ TQMetaCallEvent::~TQMetaCallEvent() Notice that the TQ_OBJECT macro is mandatory for any object that implements signals, slots or properties. You also need to run the - \link moc.html moc program (Meta Object Compiler) \endlink on the + \link tqmoc.html tqmoc program (Meta Object Compiler) \endlink on the source file. We strongly recommend the use of this macro in \e all subclasses of TQObject regardless of whether or not they actually use signals, slots and properties, since failure to do so may lead @@ -3219,7 +3219,7 @@ TQVariant TQObject::property( const char *name ) const className(), name ); return v; } - TQObject* that = (TQObject*) this; // moc ensures constness for the tqt_property call + TQObject* that = (TQObject*) this; // tqmoc ensures constness for the tqt_property call that->tqt_property( id, 1, &v ); return v; } diff --git a/src/kernel/tqobjectdefs.h b/src/kernel/tqobjectdefs.h index 422299850..69d44d6bc 100644 --- a/src/kernel/tqobjectdefs.h +++ b/src/kernel/tqobjectdefs.h @@ -71,7 +71,7 @@ #endif // The following macros are our "extensions" to C++ -// They are used, strictly speaking, only by the moc. +// They are used, strictly speaking, only by tqmoc. struct TQUObject; #ifdef QT_MOC_CPP diff --git a/src/kernel/tqprocess_unix.cpp b/src/kernel/tqprocess_unix.cpp index d85b64d71..b9a79afda 100644 --- a/src/kernel/tqprocess_unix.cpp +++ b/src/kernel/tqprocess_unix.cpp @@ -1345,7 +1345,7 @@ void TQProcess::flushStdin() } /* - This private slot is only used under Windows (but moc does not know about #if + This private slot is only used under Windows (but tqmoc does not know about #if defined()). */ void TQProcess::timeout() diff --git a/src/kernel/tqt.h b/src/kernel/tqt.h index 665f07b1a..b4aa2c6d6 100644 --- a/src/kernel/tqt.h +++ b/src/kernel/tqt.h @@ -26,7 +26,4 @@ Boston, MA 02110-1301, USA. #define Qt TQt -#define tqmoc moc -#define TQMOC MOC - #endif /* TQT_H */ diff --git a/src/kernel/tqvariant.cpp b/src/kernel/tqvariant.cpp index e400dbd07..71175edac 100644 --- a/src/kernel/tqvariant.cpp +++ b/src/kernel/tqvariant.cpp @@ -984,10 +984,10 @@ void TQVariant::clear() /* Attention! - For dependency reasons, this table is duplicated in moc.y. If you + For dependency reasons, this table is duplicated in tqmoc.y. If you change one, change both. - (Search for the word 'Attention' in moc.y.) + (Search for the word 'Attention' in tqmoc.y.) */ static const int ntypes = 35; static const char* const type_map[ntypes] = diff --git a/src/tmp/README b/src/tmp/README index d9f9bac27..fb1136b5c 100644 --- a/src/tmp/README +++ b/src/tmp/README @@ -1 +1 @@ -This is a temporary directory for moc output +This is a temporary directory for tqmoc output diff --git a/src/moc/README b/src/tqmoc/README index 4105ba68b..988b2004d 100644 --- a/src/moc/README +++ b/src/tqmoc/README @@ -1,10 +1,10 @@ This directory contains the source code for the TQt Meta Object -Compiler (moc). +Compiler (tqmoc). -The files moc_yacc.cpp, moc_yacc.h and moc_lex.cpp are generated by -lex and yacc from moc.l and moc.y. +The files tqmoc_yacc.cpp, tqmoc_yacc.h and tqmoc_lex.cpp are generated by +lex and yacc from tqmoc.l and tqmoc.y. -To compile the moc program from scratch, you need lex and yacc. These +To compile the tqmoc program from scratch, you need lex and yacc. These tools are preinstalled on most Unix systems, often as symbolic links to flex and byacc or bison. diff --git a/src/moc/moc.l b/src/tqmoc/tqmoc.l index b5388077f..373c6712c 100644 --- a/src/moc/moc.l +++ b/src/tqmoc/tqmoc.l @@ -39,9 +39,9 @@ *****************************************************************************/ %{ -#ifdef MOC_YACC_CODE +#ifdef TQMOC_YACC_CODE -#ifdef MOC_MWERKS_PLUGIN +#ifdef TQMOC_MWERKS_PLUGIN #ifdef Q_OS_MAC9 # define isascii(c) ((int)( (unsigned int) (c) <= (unsigned char)0x7F )) #endif @@ -102,7 +102,7 @@ class TQString; extern void addExpressionChar( const char ); extern void addExpressionString( const char * ); -extern void moc_warn( const char *msg ); +extern void tqmoc_warn( const char *msg ); %} %start OUTSIDE QT_DEF IN_CLASS IN_NAMESPACE IN_ENUM IN_EXPR IN_DEF_ARG IN_FCT IN_TEMPL_ARGS GIMME_SEMICOLON SKIP IN_PROPERTY IN_CLASSINFO @@ -148,7 +148,7 @@ STRING {ALMOSTSTRING}\" if ( classPLevel == 1 ) return TQ_OBJECT; else if ( classPLevel > 1 ) - moc_warn( "Cannot use TQ_OBJECT in nested class." ); + tqmoc_warn( "Cannot use TQ_OBJECT in nested class." ); } <IN_CLASS>"TQ_PROPERTY" { X;if( classPLevel == 1 ) return TQ_PROPERTY; } <IN_CLASS>"TQ_OVERRIDE" { X;if( classPLevel == 1 ) return TQ_OVERRIDE; } @@ -443,7 +443,7 @@ STRING {ALMOSTSTRING}\" } else if ( s.contains( "MOC_SKIP_END" ) ) { if ( skipLevel == 0 ) { - moc_warn(" MOC_SKIP_END without MOC_SKIP_BEGIN"); + tqmoc_warn(" MOC_SKIP_END without MOC_SKIP_BEGIN"); } else { skipLevel--; if ( skipLevel == 0 ) { @@ -495,4 +495,4 @@ STRING {ALMOSTSTRING}\" %% -#endif // MOC_YACC_CODE +#endif // TQMOC_YACC_CODE diff --git a/src/moc/moc.pro b/src/tqmoc/tqmoc.pro index b8ff335d7..2a430efee 100644 --- a/src/moc/moc.pro +++ b/src/tqmoc/tqmoc.pro @@ -39,10 +39,10 @@ SOURCES = ../tools/tqbuffer.cpp \ ../codecs/tqutfcodec.cpp isEmpty(QT_PRODUCT)|contains(QT_PRODUCT, qt-internal) { - LEXSOURCES = moc.l - YACCSOURCES = moc.y + LEXSOURCES = tqmoc.l + YACCSOURCES = tqmoc.y } else { - SOURCES += moc_yacc.cpp + SOURCES += tqmoc_yacc.cpp } unix:SOURCES += ../tools/tqfile_unix.cpp ../tools/tqdir_unix.cpp ../tools/tqfileinfo_unix.cpp @@ -57,7 +57,7 @@ INSTALLS += target TARGET = McMoc CONFIG -= static CONFIG += shared plugin - DEFINES += MOC_MWERKS_PLUGIN + DEFINES += TQMOC_MWERKS_PLUGIN MWERKSDIR = $QT_SOURCE_TREE/util/mwerks_plugin INCLUDEPATH += $$MWERKSDIR/Headers LIBS += $$MWERKSDIR/Libraries/PluginLib4.shlb diff --git a/src/moc/moc.y b/src/tqmoc/tqmoc.y index 7eb667842..3309ee7b6 100644 --- a/src/moc/moc.y +++ b/src/tqmoc/tqmoc.y @@ -55,7 +55,7 @@ *****************************************************************************/ %{ -#define MOC_YACC_CODE +#define TQMOC_YACC_CODE void yyerror( const char *msg ); #include "qplatformdefs.h" @@ -67,7 +67,7 @@ void yyerror( const char *msg ); #include "tqptrlist.h" #include "tqregexp.h" #include "tqstrlist.h" -#ifdef MOC_MWERKS_PLUGIN +#ifdef TQMOC_MWERKS_PLUGIN # ifdef Q_OS_MACX # undef OLD_DEBUG # ifdef DEBUG @@ -108,9 +108,9 @@ static void selectOutsideClassState(); static void registerClassInNamespace(); static bool suppress_func_warn = FALSE; static void func_warn( const char *msg ); -static void moc_warn( const char *msg ); -static void moc_err( const char *s ); -static void moc_err( const char *s1, const char *s2 ); +static void tqmoc_warn( const char *msg ); +static void tqmoc_err( const char *s ); +static void tqmoc_err( const char *s1, const char *s2 ); static void operatorError(); static void checkPropertyName( const char* ident ); @@ -681,8 +681,8 @@ extern "C" int hack_isatty( int ) # endif # define YYDEBUG 1 -# include "moc_yacc.h" -# include "moc_lex.cpp" +# include "tqmoc_yacc.h" +# include "tqmoc_lex.cpp" #endif //YYBISON %} @@ -1236,7 +1236,7 @@ obj_member_list: obj_member_list obj_member_area qt_access_specifier: access_specifier { tmpAccess = $1; } - | SLOTS { moc_err( "Missing access specifier" + | SLOTS { tqmoc_err( "Missing access specifier" " before \"slots:\"." ); } ; @@ -1246,7 +1246,7 @@ obj_member_area: qt_access_specifier { BEGIN QT_DEF; } ':' opt_signal_declarations | TQ_OBJECT { if ( tmpAccess ) - moc_warn("TQ_OBJECT is not in the private" + tqmoc_warn("TQ_OBJECT is not in the private" " section of the class.\n" "TQ_OBJECT is a macro that resets" " access permission to \"private\"."); @@ -1287,7 +1287,7 @@ obj_member_area: qt_access_specifier { BEGIN QT_DEF; } opt_property_candidates ; -slot_area: SIGNALS ':' { moc_err( "Signals cannot " +slot_area: SIGNALS ':' { tqmoc_err( "Signals cannot " "have access specifiers" ); } | SLOTS ':' opt_slot_declarations | ':' { if ( tmpAccess == Public && TQ_PROPERTYdetected ) @@ -1302,7 +1302,7 @@ slot_area: SIGNALS ':' { moc_err( "Signals cannot " } | IDENTIFIER { BEGIN IN_CLASS; if ( classPLevel != 1 ) - moc_warn( "unexpected access" + tqmoc_warn( "unexpected access" "specifier" ); } ; @@ -1488,7 +1488,7 @@ signal_or_slot: type_and_name fct_decl opt_semicolons { func_warn("Unexpected using declaration."); } | NAMESPACE IDENTIFIER '{' { classPLevel++; - moc_err("Unexpected namespace declaration."); } + tqmoc_err("Unexpected namespace declaration."); } | nested_class_head ';' opt_semicolons { func_warn("Unexpected class declaration.");} | nested_class_head @@ -1570,14 +1570,14 @@ property: IDENTIFIER IDENTIFIER prop_statements { if ( g->propRead.isEmpty() && !g->propOverride ) - moc_err( "A property must at least feature a read method." ); + tqmoc_err( "A property must at least feature a read method." ); checkPropertyName( $2 ); TQ_PROPERTYdetected = TRUE; // Avoid duplicates for( TQPtrListIterator<Property> lit( g->props ); lit.current(); ++lit ) { if ( lit.current()->name == $2 ) { if ( displayWarnings ) - moc_err( "Property '%s' defined twice.", + tqmoc_err( "Property '%s' defined twice.", (const char*)lit.current()->name ); } } @@ -1619,7 +1619,7 @@ extern "C" int hack_isatty( int ) # else # include <unistd.h> # endif -# include "moc_lex.cpp" +# include "tqmoc_lex.cpp" #endif //YYBISON void cleanup(); @@ -1673,7 +1673,7 @@ void setDefaultIncludeFile() #define ErrorFormatString "%s:%d:" #endif -#ifndef MOC_MWERKS_PLUGIN +#ifndef TQMOC_MWERKS_PLUGIN int main( int argc, char **argv ) { init(); @@ -1771,21 +1771,21 @@ int main( int argc, char **argv ) } else if ( argc < 2 || error ) { // incomplete/wrong args fprintf( stderr, "TQt meta object compiler\n" ); if ( error ) - fprintf( stderr, "moc: %s\n", error ); - fprintf( stderr, "Usage: moc [options] <header-file>\n" + fprintf( stderr, "tqmoc: %s\n", error ); + fprintf( stderr, "Usage: tqmoc [options] <header-file>\n" "\t-o file Write output to file rather than stdout\n" "\t-f[file] Force #include, optional file name\n" "\t-p path Path prefix for included file\n" "\t-i Do not generate an #include statement\n" "\t-k Do not stop on errors\n" "\t-nw Do not display warnings\n" - "\t-v Display version of moc\n" ); + "\t-v Display version of tqmoc\n" ); cleanup(); return 1; } else { yyin = fopen( (const char *)g->fileName, "r" ); if ( !yyin ) { - fprintf( stderr, "moc: %s: No such file\n", (const char*)g->fileName); + fprintf( stderr, "tqmoc: %s: No such file\n", (const char*)g->fileName); cleanup(); return 1; } @@ -1793,7 +1793,7 @@ int main( int argc, char **argv ) if ( !g->outputFile.isEmpty() ) { // output file specified out = fopen( (const char *)g->outputFile, "w" ); // create output file if ( !out ) { - fprintf( stderr, "moc: Cannot create %s\n", + fprintf( stderr, "tqmoc: Cannot create %s\n", (const char*)g->outputFile ); cleanup(); return 1; @@ -1835,7 +1835,7 @@ const unsigned char *p_str(const char *, int =-1); CWPluginContext g_ctx; -moc_status do_moc( CWPluginContext ctx, const TQCString &fin, const TQCString &fout, CWFileSpec *dspec, bool i) +tqmoc_status do_moc( CWPluginContext ctx, const TQCString &fin, const TQCString &fout, CWFileSpec *dspec, bool i) { init(); @@ -1853,7 +1853,7 @@ moc_status do_moc( CWPluginContext ctx, const TQCString &fin, const TQCString &f fi.isdependentoffile = kCurrentCompiledFile; if(CWFindAndLoadFile( ctx, fin.data(), &fi) != cwNoErr) { cleanup(); - return moc_no_source; + return tqmoc_no_source; } if(dspec) { @@ -1872,7 +1872,7 @@ moc_status do_moc( CWPluginContext ctx, const TQCString &fin, const TQCString &f char tmp[sizeof(Str63)+2]; if(NewAlias( NULL, &fi.filespec, &alias) != noErr) { cleanup(); - return moc_general_error; + return tqmoc_general_error; } for(;;) { GetAliasInfo(alias, x++, str); @@ -1889,18 +1889,18 @@ moc_status do_moc( CWPluginContext ctx, const TQCString &fin, const TQCString &f struct stat istat, ostat; if(stat(inpath, &istat) == -1) { cleanup(); - return moc_no_source; + return tqmoc_no_source; } if(stat(outpath, &ostat) == 0 && istat.st_mtime < ostat.st_mtime) { cleanup(); - return moc_not_time; + return tqmoc_not_time; } unlink(outpath.data()); out = fopen(outpath.data(), "w+"); if(!out) { cleanup(); - return moc_general_error; + return tqmoc_general_error; } yyparse(); @@ -1909,13 +1909,13 @@ moc_status do_moc( CWPluginContext ctx, const TQCString &fin, const TQCString &f if(g->mocError || !g->generatedCode) { unlink(outpath.data()); - moc_status ret = !g->generatedCode ? moc_no_qobject : moc_parse_error; + tqmoc_status ret = !g->generatedCode ? tqmoc_no_qobject : tqmoc_parse_error; cleanup(); return ret; } cleanup(); - return moc_success; + return tqmoc_success; } #endif void replace( char *s, char c1, char c2 ) @@ -1996,7 +1996,7 @@ void init() // initialize tmpFunc = new Function; tmpEnum = new Enum; -#ifdef MOC_MWERKS_PLUGIN +#ifdef TQMOC_MWERKS_PLUGIN buf_buffer = NULL; buf_index = 0; buf_size_total = 0; @@ -2008,7 +2008,7 @@ void cleanup() delete g; g = NULL; -#ifdef MOC_MWERKS_PLUGIN +#ifdef TQMOC_MWERKS_PLUGIN if(buf_buffer && g_ctx) CWReleaseFileText(g_ctx, buf_buffer); #endif @@ -2191,7 +2191,7 @@ void addExpressionChar( const char c ) void yyerror( const char *msg ) // print yacc error message { g->mocError = TRUE; -#ifndef MOC_MWERKS_PLUGIN +#ifndef TQMOC_MWERKS_PLUGIN fprintf( stderr, ErrorFormatString" Error: %s\n", g->fileName.data(), lineNo, msg ); #else char msg2[200]; @@ -2205,25 +2205,25 @@ void yyerror( const char *msg ) // print yacc error message } } -void moc_err( const char *s ) +void tqmoc_err( const char *s ) { yyerror( s ); } -void moc_err( const char *s1, const char *s2 ) +void tqmoc_err( const char *s1, const char *s2 ) { static char tmp[1024]; sprintf( tmp, s1, s2 ); yyerror( tmp ); } -void moc_warn( const char *msg ) +void tqmoc_warn( const char *msg ) { if ( displayWarnings ) fprintf( stderr, ErrorFormatString" Warning: %s\n", g->fileName.data(), lineNo, msg); } -void moc_warn( char *s1, char *s2 ) +void tqmoc_warn( char *s1, char *s2 ) { static char tmp[1024]; sprintf( tmp, s1, s2 ); @@ -2234,14 +2234,14 @@ void moc_warn( char *s1, char *s2 ) void func_warn( const char *msg ) { if ( !suppress_func_warn ) - moc_warn( msg ); + tqmoc_warn( msg ); skipFunc = TRUE; } void operatorError() { if ( !suppress_func_warn ) - moc_warn("Operator functions cannot be signals or slots."); + tqmoc_warn("Operator functions cannot be signals or slots."); skipFunc = TRUE; } @@ -2732,7 +2732,7 @@ int generateProps() // if ( g->props.count() ) { if ( displayWarnings && !TQ_OBJECTdetected ) - moc_err("The declaration of the class \"%s\" contains properties" + tqmoc_err("The declaration of the class \"%s\" contains properties" " but no TQ_OBJECT macro.", g->className.data()); fprintf( out, "#ifndef TQT_NO_PROPERTIES\n" ); @@ -2814,7 +2814,7 @@ int generateClassInfos() return 0; if ( displayWarnings && !TQ_OBJECTdetected ) - moc_err("The declaration of the class \"%s\" contains class infos" + tqmoc_err("The declaration of the class \"%s\" contains class infos" " but no TQ_OBJECT macro.", g->className.data()); fprintf( out, " static const TQClassInfo classinfo_tbl[] = {\n" ); @@ -2845,17 +2845,17 @@ void generateClass() // generate C++ source code for a class if ( g->signals.count() == 0 && g->slots.count() == 0 && g->props.count() == 0 && g->infos.count() == 0 ) return; if ( displayWarnings && (g->signals.count() + g->slots.count()) != 0 ) - moc_err("The declaration of the class \"%s\" contains signals " + tqmoc_err("The declaration of the class \"%s\" contains signals " "or slots\n\t but no TQ_OBJECT macro.", g->className.data()); } else { if ( g->superClassName.isEmpty() ) - moc_err("The declaration of the class \"%s\" contains the\n" + tqmoc_err("The declaration of the class \"%s\" contains the\n" "\tTQ_OBJECT macro but does not inherit from any class!\n" "\tInherit from TQObject or one of its descendants" " or remove TQ_OBJECT.", g->className.data() ); } if ( templateClass ) { // don't generate for class - moc_err( "Sorry, TQt does not support templates that contain\n" + tqmoc_err( "Sorry, TQt does not support templates that contain\n" "\tsignals, slots or TQ_OBJECT." ); return; } @@ -2908,9 +2908,9 @@ void generateClass() // generate C++ source code for a class fprintf( out, "#include <%sntqapplication.h>\n\n", (const char*)g->qtPath ); fprintf( out, "#include <%sprivate/tqucomextra_p.h>\n", (const char*)g->qtPath ); fprintf( out, "#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != %d)\n", formatRevision ); - fprintf( out, "#error \"This file was generated using the moc from %s." + fprintf( out, "#error \"This file was generated using the tqmoc from %s." " It\"\n#error \"cannot be used with the include files from" - " this version of TQt.\"\n#error \"(The moc has changed too" + " this version of TQt.\"\n#error \"(TQMoc has changed too" " much.)\"\n", TQT_VERSION_STR ); fprintf( out, "#endif\n\n" ); } else { @@ -3540,7 +3540,7 @@ void addEnum() if ( lit.current()->name == tmpEnum->name ) { if ( displayWarnings ) - moc_err( "Enum %s defined twice.", (const char*)tmpEnum->name ); + tqmoc_err( "Enum %s defined twice.", (const char*)tmpEnum->name ); } } @@ -3601,7 +3601,7 @@ void addMember( Member m ) void checkPropertyName( const char* ident ) { if ( ident[0] == '_' ) { - moc_err( "Invalid property name '%s'.", ident ); + tqmoc_err( "Invalid property name '%s'.", ident ); return; } } diff --git a/src/moc/moc_lex.cpp b/src/tqmoc/tqmoc_lex.cpp index 0fcd62c21..aba3d5b48 100644 --- a/src/moc/moc_lex.cpp +++ b/src/tqmoc/tqmoc_lex.cpp @@ -984,9 +984,9 @@ char *yytext; ** *****************************************************************************/ #line 42 "moc.l" -#ifdef MOC_YACC_CODE +#ifdef TQMOC_YACC_CODE -#ifdef MOC_MWERKS_PLUGIN +#ifdef TQMOC_MWERKS_PLUGIN #ifdef Q_OS_MAC9 # define isascii(c) ((int)( (unsigned int) (c) <= (unsigned char)0x7F )) #endif @@ -1047,7 +1047,7 @@ class TQString; extern void addExpressionChar( const char ); extern void addExpressionString( const char * ); -extern void moc_warn( const char *msg ); +extern void tqmoc_warn( const char *msg ); #line 1053 "lex.yy.c" @@ -1465,7 +1465,7 @@ YY_RULE_SETUP if ( classPLevel == 1 ) return TQ_OBJECT; else if ( classPLevel > 1 ) - moc_warn( "Cannot use TQ_OBJECT in nested class." ); + tqmoc_warn( "Cannot use TQ_OBJECT in nested class." ); } YY_BREAK case 24: @@ -2180,7 +2180,7 @@ YY_RULE_SETUP } else if ( s.contains( "MOC_SKIP_END" ) ) { if ( skipLevel == 0 ) { - moc_warn(" MOC_SKIP_END without MOC_SKIP_BEGIN"); + tqmoc_warn(" MOC_SKIP_END without MOC_SKIP_BEGIN"); } else { skipLevel--; if ( skipLevel == 0 ) { @@ -3311,5 +3311,5 @@ void yyfree (void * ptr ) -#endif // MOC_YACC_CODE +#endif // TQMOC_YACC_CODE diff --git a/src/moc/moc_yacc.cpp b/src/tqmoc/tqmoc_yacc.cpp index 83994e260..ea0f36a2d 100644 --- a/src/moc/moc_yacc.cpp +++ b/src/tqmoc/tqmoc_yacc.cpp @@ -66,9 +66,9 @@ /* Copy the first part of user declarations. */ /* Line 268 of yacc.c */ -#line 57 "moc.y" +#line 57 "tqmoc.y" -#define MOC_YACC_CODE +#define TQMOC_YACC_CODE void yyerror( const char *msg ); #include "qplatformdefs.h" @@ -80,7 +80,7 @@ void yyerror( const char *msg ); #include "tqptrlist.h" #include "tqregexp.h" #include "tqstrlist.h" -#ifdef MOC_MWERKS_PLUGIN +#ifdef TQMOC_MWERKS_PLUGIN # ifdef Q_OS_MACX # undef OLD_DEBUG # ifdef DEBUG @@ -121,9 +121,9 @@ static void selectOutsideClassState(); static void registerClassInNamespace(); static bool suppress_func_warn = FALSE; static void func_warn( const char *msg ); -static void moc_warn( const char *msg ); -static void moc_err( const char *s ); -static void moc_err( const char *s1, const char *s2 ); +static void tqmoc_warn( const char *msg ); +static void tqmoc_err( const char *s ); +static void tqmoc_err( const char *s1, const char *s2 ); static void operatorError(); static void checkPropertyName( const char* ident ); @@ -694,13 +694,13 @@ extern "C" int hack_isatty( int ) # endif # define YYDEBUG 1 -# include "moc_yacc.h" -# include "moc_lex.cpp" +# include "tqmoc_yacc.h" +# include "tqmoc_lex.cpp" #endif //YYBISON /* Line 268 of yacc.c */ -#line 704 "moc_yacc" +#line 704 "tqmoc_yacc" /* Enabling traces. */ #ifndef YYDEBUG @@ -847,7 +847,7 @@ typedef union YYSTYPE { /* Line 293 of yacc.c */ -#line 692 "moc.y" +#line 692 "tqmoc.y" char char_val; int int_val; @@ -861,7 +861,7 @@ typedef union YYSTYPE /* Line 293 of yacc.c */ -#line 865 "moc_yacc" +#line 865 "tqmoc_yacc" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -873,7 +873,7 @@ typedef union YYSTYPE /* Line 343 of yacc.c */ -#line 877 "moc_yacc" +#line 877 "tqmoc_yacc" #ifdef short # undef short @@ -2655,21 +2655,21 @@ yyreduce: case 11: /* Line 1806 of yacc.c */ -#line 824 "moc.y" +#line 824 "tqmoc.y" { enterNameSpace((yyvsp[(2) - (2)].string)); } break; case 12: /* Line 1806 of yacc.c */ -#line 825 "moc.y" +#line 825 "tqmoc.y" { BEGIN IN_NAMESPACE; } break; case 13: /* Line 1806 of yacc.c */ -#line 827 "moc.y" +#line 827 "tqmoc.y" { leaveNameSpace(); selectOutsideClassState(); } @@ -2678,21 +2678,21 @@ yyreduce: case 14: /* Line 1806 of yacc.c */ -#line 832 "moc.y" +#line 832 "tqmoc.y" { enterNameSpace(); } break; case 15: /* Line 1806 of yacc.c */ -#line 833 "moc.y" +#line 833 "tqmoc.y" { BEGIN IN_NAMESPACE; } break; case 16: /* Line 1806 of yacc.c */ -#line 835 "moc.y" +#line 835 "tqmoc.y" { leaveNameSpace(); selectOutsideClassState(); } @@ -2701,42 +2701,42 @@ yyreduce: case 18: /* Line 1806 of yacc.c */ -#line 844 "moc.y" +#line 844 "tqmoc.y" { selectOutsideClassState(); } break; case 19: /* Line 1806 of yacc.c */ -#line 848 "moc.y" +#line 848 "tqmoc.y" { selectOutsideClassState(); } break; case 20: /* Line 1806 of yacc.c */ -#line 851 "moc.y" +#line 851 "tqmoc.y" { selectOutsideClassState(); } break; case 21: /* Line 1806 of yacc.c */ -#line 852 "moc.y" +#line 852 "tqmoc.y" { selectOutsideClassState(); } break; case 22: /* Line 1806 of yacc.c */ -#line 855 "moc.y" +#line 855 "tqmoc.y" { initClass(); } break; case 23: /* Line 1806 of yacc.c */ -#line 856 "moc.y" +#line 856 "tqmoc.y" { generateClass(); registerClassInNamespace(); selectOutsideClassState(); } @@ -2745,21 +2745,21 @@ yyreduce: case 24: /* Line 1806 of yacc.c */ -#line 864 "moc.y" +#line 864 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 25: /* Line 1806 of yacc.c */ -#line 865 "moc.y" +#line 865 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 26: /* Line 1806 of yacc.c */ -#line 869 "moc.y" +#line 869 "tqmoc.y" { g->tmpExpression = rmWS( g->tmpExpression ); (yyval.string) = stradd( (yyvsp[(1) - (4)].string), "<", g->tmpExpression, ">" ); } @@ -2768,7 +2768,7 @@ yyreduce: case 27: /* Line 1806 of yacc.c */ -#line 880 "moc.y" +#line 880 "tqmoc.y" { initExpression(); templLevel = 1; BEGIN IN_TEMPL_ARGS; } @@ -2777,7 +2777,7 @@ yyreduce: case 28: /* Line 1806 of yacc.c */ -#line 893 "moc.y" +#line 893 "tqmoc.y" { initExpression(); BEGIN IN_EXPR; } break; @@ -2785,14 +2785,14 @@ yyreduce: case 29: /* Line 1806 of yacc.c */ -#line 902 "moc.y" +#line 902 "tqmoc.y" { BEGIN IN_DEF_ARG; } break; case 30: /* Line 1806 of yacc.c */ -#line 905 "moc.y" +#line 905 "tqmoc.y" { initExpression(); BEGIN IN_ENUM; } break; @@ -2800,210 +2800,210 @@ yyreduce: case 31: /* Line 1806 of yacc.c */ -#line 911 "moc.y" +#line 911 "tqmoc.y" { (yyval.string) = ""; } break; case 32: /* Line 1806 of yacc.c */ -#line 912 "moc.y" +#line 912 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 33: /* Line 1806 of yacc.c */ -#line 913 "moc.y" +#line 913 "tqmoc.y" { (yyval.string) = ""; } break; case 34: /* Line 1806 of yacc.c */ -#line 914 "moc.y" +#line 914 "tqmoc.y" { skipFunc = TRUE; (yyval.string) = ""; } break; case 35: /* Line 1806 of yacc.c */ -#line 915 "moc.y" +#line 915 "tqmoc.y" { skipFunc = TRUE; (yyval.string) = ""; } break; case 36: /* Line 1806 of yacc.c */ -#line 919 "moc.y" +#line 919 "tqmoc.y" { (yyval.string) = straddSpc((yyvsp[(1) - (3)].string),(yyvsp[(2) - (3)].string),(yyvsp[(3) - (3)].string)); } break; case 37: /* Line 1806 of yacc.c */ -#line 921 "moc.y" +#line 921 "tqmoc.y" { (yyval.string) = ""; } break; case 38: /* Line 1806 of yacc.c */ -#line 922 "moc.y" +#line 922 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 39: /* Line 1806 of yacc.c */ -#line 925 "moc.y" +#line 925 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 40: /* Line 1806 of yacc.c */ -#line 926 "moc.y" +#line 926 "tqmoc.y" { (yyval.string) = straddSpc((yyvsp[(1) - (2)].string),(yyvsp[(2) - (2)].string)); } break; case 43: /* Line 1806 of yacc.c */ -#line 931 "moc.y" +#line 931 "tqmoc.y" { skipFunc = TRUE; } break; case 45: /* Line 1806 of yacc.c */ -#line 935 "moc.y" +#line 935 "tqmoc.y" { } break; case 46: /* Line 1806 of yacc.c */ -#line 936 "moc.y" +#line 936 "tqmoc.y" { } break; case 47: /* Line 1806 of yacc.c */ -#line 939 "moc.y" +#line 939 "tqmoc.y" { (yyval.string) = "const"; } break; case 48: /* Line 1806 of yacc.c */ -#line 940 "moc.y" +#line 940 "tqmoc.y" { (yyval.string) = "volatile"; } break; case 49: /* Line 1806 of yacc.c */ -#line 943 "moc.y" +#line 943 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 50: /* Line 1806 of yacc.c */ -#line 944 "moc.y" +#line 944 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 51: /* Line 1806 of yacc.c */ -#line 945 "moc.y" +#line 945 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 52: /* Line 1806 of yacc.c */ -#line 949 "moc.y" +#line 949 "tqmoc.y" { (yyval.string) = straddSpc((yyvsp[(1) - (2)].string),(yyvsp[(2) - (2)].string)); } break; case 53: /* Line 1806 of yacc.c */ -#line 950 "moc.y" +#line 950 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 54: /* Line 1806 of yacc.c */ -#line 953 "moc.y" +#line 953 "tqmoc.y" { (yyval.string) = "char"; } break; case 55: /* Line 1806 of yacc.c */ -#line 954 "moc.y" +#line 954 "tqmoc.y" { (yyval.string) = "short"; } break; case 56: /* Line 1806 of yacc.c */ -#line 955 "moc.y" +#line 955 "tqmoc.y" { (yyval.string) = "int"; } break; case 57: /* Line 1806 of yacc.c */ -#line 956 "moc.y" +#line 956 "tqmoc.y" { (yyval.string) = "long"; } break; case 58: /* Line 1806 of yacc.c */ -#line 957 "moc.y" +#line 957 "tqmoc.y" { (yyval.string) = "signed"; } break; case 59: /* Line 1806 of yacc.c */ -#line 958 "moc.y" +#line 958 "tqmoc.y" { (yyval.string) = "unsigned"; } break; case 60: /* Line 1806 of yacc.c */ -#line 959 "moc.y" +#line 959 "tqmoc.y" { (yyval.string) = "float"; } break; case 61: /* Line 1806 of yacc.c */ -#line 960 "moc.y" +#line 960 "tqmoc.y" { (yyval.string) = "double"; } break; case 62: /* Line 1806 of yacc.c */ -#line 961 "moc.y" +#line 961 "tqmoc.y" { (yyval.string) = "void"; } break; case 63: /* Line 1806 of yacc.c */ -#line 965 "moc.y" +#line 965 "tqmoc.y" { g->tmpExpression = rmWS( g->tmpExpression ); (yyval.string) = stradd( "template<", g->tmpExpression, ">" ); } @@ -3012,7 +3012,7 @@ yyreduce: case 65: /* Line 1806 of yacc.c */ -#line 971 "moc.y" +#line 971 "tqmoc.y" { templateClassOld = templateClass; templateClass = TRUE; } @@ -3021,77 +3021,77 @@ yyreduce: case 66: /* Line 1806 of yacc.c */ -#line 977 "moc.y" +#line 977 "tqmoc.y" { (yyval.string) = "class"; } break; case 67: /* Line 1806 of yacc.c */ -#line 978 "moc.y" +#line 978 "tqmoc.y" { (yyval.string) = "struct"; } break; case 68: /* Line 1806 of yacc.c */ -#line 981 "moc.y" +#line 981 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 69: /* Line 1806 of yacc.c */ -#line 983 "moc.y" +#line 983 "tqmoc.y" { (yyval.string) = stradd( "::", (yyvsp[(2) - (2)].string) ); } break; case 70: /* Line 1806 of yacc.c */ -#line 987 "moc.y" +#line 987 "tqmoc.y" { (yyval.string) = stradd( (yyvsp[(1) - (3)].string), "::", (yyvsp[(3) - (3)].string) );} break; case 71: /* Line 1806 of yacc.c */ -#line 988 "moc.y" +#line 988 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 72: /* Line 1806 of yacc.c */ -#line 992 "moc.y" +#line 992 "tqmoc.y" { (yyval.string) = straddSpc((yyvsp[(1) - (2)].string),(yyvsp[(2) - (2)].string)); } break; case 73: /* Line 1806 of yacc.c */ -#line 993 "moc.y" +#line 993 "tqmoc.y" { (yyval.string) = stradd("enum ",(yyvsp[(2) - (2)].string)); } break; case 74: /* Line 1806 of yacc.c */ -#line 994 "moc.y" +#line 994 "tqmoc.y" { (yyval.string) = stradd("union ",(yyvsp[(2) - (2)].string)); } break; case 75: /* Line 1806 of yacc.c */ -#line 999 "moc.y" +#line 999 "tqmoc.y" { (yyval.arg_list) = (yyvsp[(1) - (2)].arg_list);} break; case 76: /* Line 1806 of yacc.c */ -#line 1000 "moc.y" +#line 1000 "tqmoc.y" { (yyval.arg_list) = (yyvsp[(1) - (3)].arg_list); func_warn("Ellipsis not supported" " in signals and slots.\n" @@ -3101,28 +3101,28 @@ yyreduce: case 77: /* Line 1806 of yacc.c */ -#line 1006 "moc.y" +#line 1006 "tqmoc.y" { (yyval.arg_list) = tmpArgList; } break; case 78: /* Line 1806 of yacc.c */ -#line 1007 "moc.y" +#line 1007 "tqmoc.y" { (yyval.arg_list) = (yyvsp[(1) - (1)].arg_list); } break; case 79: /* Line 1806 of yacc.c */ -#line 1010 "moc.y" +#line 1010 "tqmoc.y" { (yyval.arg) = 0; } break; case 82: /* Line 1806 of yacc.c */ -#line 1015 "moc.y" +#line 1015 "tqmoc.y" { func_warn("Ellipsis not supported" " in signals and slots.\n" "Ellipsis argument ignored."); } @@ -3131,91 +3131,91 @@ yyreduce: case 83: /* Line 1806 of yacc.c */ -#line 1023 "moc.y" +#line 1023 "tqmoc.y" { (yyval.arg_list) = addArg((yyvsp[(3) - (3)].arg)); } break; case 84: /* Line 1806 of yacc.c */ -#line 1024 "moc.y" +#line 1024 "tqmoc.y" { (yyval.arg_list) = addArg((yyvsp[(1) - (1)].arg)); } break; case 85: /* Line 1806 of yacc.c */ -#line 1028 "moc.y" +#line 1028 "tqmoc.y" { (yyval.arg) = new Argument(straddSpc((yyvsp[(1) - (2)].string),(yyvsp[(2) - (2)].string)),""); } break; case 86: /* Line 1806 of yacc.c */ -#line 1030 "moc.y" +#line 1030 "tqmoc.y" { expLevel = 1; } break; case 87: /* Line 1806 of yacc.c */ -#line 1032 "moc.y" +#line 1032 "tqmoc.y" { (yyval.arg) = new Argument(straddSpc((yyvsp[(1) - (5)].string),(yyvsp[(2) - (5)].string)),"", 0, TRUE ); } break; case 88: /* Line 1806 of yacc.c */ -#line 1035 "moc.y" +#line 1035 "tqmoc.y" { (yyval.arg) = new Argument(straddSpc((yyvsp[(1) - (4)].string),(yyvsp[(2) - (4)].string)),(yyvsp[(4) - (4)].string), (yyvsp[(3) - (4)].string)); } break; case 89: /* Line 1806 of yacc.c */ -#line 1038 "moc.y" +#line 1038 "tqmoc.y" { expLevel = 1; } break; case 90: /* Line 1806 of yacc.c */ -#line 1040 "moc.y" +#line 1040 "tqmoc.y" { (yyval.arg) = new Argument(straddSpc((yyvsp[(1) - (7)].string),(yyvsp[(2) - (7)].string)),(yyvsp[(4) - (7)].string), (yyvsp[(3) - (7)].string), TRUE); } break; case 91: /* Line 1806 of yacc.c */ -#line 1044 "moc.y" +#line 1044 "tqmoc.y" { (yyval.string) = ""; } break; case 92: /* Line 1806 of yacc.c */ -#line 1045 "moc.y" +#line 1045 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 93: /* Line 1806 of yacc.c */ -#line 1049 "moc.y" +#line 1049 "tqmoc.y" { (yyval.string) = straddSpc((yyvsp[(1) - (2)].string),(yyvsp[(2) - (2)].string)); } break; case 94: /* Line 1806 of yacc.c */ -#line 1050 "moc.y" +#line 1050 "tqmoc.y" { expLevel = 1; } break; case 95: /* Line 1806 of yacc.c */ -#line 1052 "moc.y" +#line 1052 "tqmoc.y" { (yyval.string) = stradd( "[", g->tmpExpression = g->tmpExpression.stripWhiteSpace(), "]" ); } @@ -3224,14 +3224,14 @@ yyreduce: case 96: /* Line 1806 of yacc.c */ -#line 1055 "moc.y" +#line 1055 "tqmoc.y" { expLevel = 1; } break; case 97: /* Line 1806 of yacc.c */ -#line 1057 "moc.y" +#line 1057 "tqmoc.y" { (yyval.string) = stradd( (yyvsp[(1) - (5)].string),"[", g->tmpExpression = g->tmpExpression.stripWhiteSpace(),"]" ); } @@ -3240,42 +3240,42 @@ yyreduce: case 98: /* Line 1806 of yacc.c */ -#line 1060 "moc.y" +#line 1060 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 99: /* Line 1806 of yacc.c */ -#line 1061 "moc.y" +#line 1061 "tqmoc.y" { (yyval.string) = (yyvsp[(2) - (3)].string); } break; case 100: /* Line 1806 of yacc.c */ -#line 1064 "moc.y" +#line 1064 "tqmoc.y" { (yyval.string) = ""; } break; case 101: /* Line 1806 of yacc.c */ -#line 1066 "moc.y" +#line 1066 "tqmoc.y" { (yyval.string) = straddSpc((yyvsp[(1) - (2)].string),(yyvsp[(2) - (2)].string));} break; case 102: /* Line 1806 of yacc.c */ -#line 1067 "moc.y" +#line 1067 "tqmoc.y" { expLevel = 1; } break; case 103: /* Line 1806 of yacc.c */ -#line 1069 "moc.y" +#line 1069 "tqmoc.y" { (yyval.string) = stradd( (yyvsp[(1) - (5)].string),"[", g->tmpExpression = g->tmpExpression.stripWhiteSpace(),"]" ); } @@ -3284,14 +3284,14 @@ yyreduce: case 104: /* Line 1806 of yacc.c */ -#line 1072 "moc.y" +#line 1072 "tqmoc.y" { (yyval.string) = (yyvsp[(2) - (3)].string); } break; case 106: /* Line 1806 of yacc.c */ -#line 1086 "moc.y" +#line 1086 "tqmoc.y" { tmpFunc->args = (yyvsp[(2) - (8)].arg_list); tmpFunc->qualifier = (yyvsp[(4) - (8)].string); } break; @@ -3299,154 +3299,154 @@ yyreduce: case 108: /* Line 1806 of yacc.c */ -#line 1092 "moc.y" +#line 1092 "tqmoc.y" { func_warn("Variable as signal or slot."); } break; case 109: /* Line 1806 of yacc.c */ -#line 1093 "moc.y" +#line 1093 "tqmoc.y" { expLevel=0; } break; case 110: /* Line 1806 of yacc.c */ -#line 1095 "moc.y" +#line 1095 "tqmoc.y" { skipFunc = TRUE; } break; case 111: /* Line 1806 of yacc.c */ -#line 1096 "moc.y" +#line 1096 "tqmoc.y" { expLevel=0; } break; case 112: /* Line 1806 of yacc.c */ -#line 1098 "moc.y" +#line 1098 "tqmoc.y" { skipFunc = TRUE; } break; case 113: /* Line 1806 of yacc.c */ -#line 1102 "moc.y" +#line 1102 "tqmoc.y" { expLevel = 1; } break; case 115: /* Line 1806 of yacc.c */ -#line 1104 "moc.y" +#line 1104 "tqmoc.y" { expLevel = 1; } break; case 117: /* Line 1806 of yacc.c */ -#line 1109 "moc.y" +#line 1109 "tqmoc.y" { (yyval.string) = ""; } break; case 118: /* Line 1806 of yacc.c */ -#line 1110 "moc.y" +#line 1110 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 119: /* Line 1806 of yacc.c */ -#line 1113 "moc.y" +#line 1113 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 120: /* Line 1806 of yacc.c */ -#line 1114 "moc.y" +#line 1114 "tqmoc.y" { (yyval.string) = straddSpc((yyvsp[(1) - (2)].string),(yyvsp[(2) - (2)].string));} break; case 121: /* Line 1806 of yacc.c */ -#line 1117 "moc.y" +#line 1117 "tqmoc.y" { (yyval.string) = straddSpc("*",(yyvsp[(2) - (2)].string));} break; case 122: /* Line 1806 of yacc.c */ -#line 1118 "moc.y" +#line 1118 "tqmoc.y" { (yyval.string) = stradd("&",(yyvsp[(2) - (2)].string));} break; case 123: /* Line 1806 of yacc.c */ -#line 1125 "moc.y" +#line 1125 "tqmoc.y" { (yyval.string) = ""; } break; case 124: /* Line 1806 of yacc.c */ -#line 1126 "moc.y" +#line 1126 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 125: /* Line 1806 of yacc.c */ -#line 1129 "moc.y" +#line 1129 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 126: /* Line 1806 of yacc.c */ -#line 1131 "moc.y" +#line 1131 "tqmoc.y" { (yyval.string) = straddSpc((yyvsp[(1) - (2)].string),(yyvsp[(2) - (2)].string)); } break; case 127: /* Line 1806 of yacc.c */ -#line 1134 "moc.y" +#line 1134 "tqmoc.y" { (yyval.string) = "const"; } break; case 128: /* Line 1806 of yacc.c */ -#line 1135 "moc.y" +#line 1135 "tqmoc.y" { (yyval.string) = "volatile"; } break; case 132: /* Line 1806 of yacc.c */ -#line 1143 "moc.y" +#line 1143 "tqmoc.y" { BEGIN IN_FCT; fctLevel = 1;} break; case 133: /* Line 1806 of yacc.c */ -#line 1144 "moc.y" +#line 1144 "tqmoc.y" { BEGIN QT_DEF; } break; case 134: /* Line 1806 of yacc.c */ -#line 1151 "moc.y" +#line 1151 "tqmoc.y" { BEGIN IN_CLASS; classPLevel = 1; } @@ -3455,14 +3455,14 @@ yyreduce: case 135: /* Line 1806 of yacc.c */ -#line 1155 "moc.y" +#line 1155 "tqmoc.y" { BEGIN QT_DEF; } break; case 136: /* Line 1806 of yacc.c */ -#line 1156 "moc.y" +#line 1156 "tqmoc.y" { BEGIN QT_DEF; /* -- " -- */ skipClass = TRUE; } break; @@ -3470,7 +3470,7 @@ yyreduce: case 137: /* Line 1806 of yacc.c */ -#line 1158 "moc.y" +#line 1158 "tqmoc.y" { BEGIN QT_DEF; /* -- " -- */ skipClass = TRUE; } break; @@ -3478,7 +3478,7 @@ yyreduce: case 138: /* Line 1806 of yacc.c */ -#line 1160 "moc.y" +#line 1160 "tqmoc.y" { BEGIN QT_DEF; /* -- " -- */ skipClass = TRUE; } break; @@ -3486,7 +3486,7 @@ yyreduce: case 139: /* Line 1806 of yacc.c */ -#line 1164 "moc.y" +#line 1164 "tqmoc.y" { BEGIN QT_DEF; /* catch ';' */ skipClass = TRUE; } break; @@ -3494,7 +3494,7 @@ yyreduce: case 140: /* Line 1806 of yacc.c */ -#line 1166 "moc.y" +#line 1166 "tqmoc.y" { skipClass = TRUE; BEGIN GIMME_SEMICOLON; } break; @@ -3502,14 +3502,14 @@ yyreduce: case 144: /* Line 1806 of yacc.c */ -#line 1173 "moc.y" +#line 1173 "tqmoc.y" { (yyval.string) = ""; } break; case 146: /* Line 1806 of yacc.c */ -#line 1179 "moc.y" +#line 1179 "tqmoc.y" { g->className = (yyvsp[(2) - (2)].string); if ( g->className == "TQObject" ) TQ_OBJECTdetected = TRUE; @@ -3519,7 +3519,7 @@ yyreduce: case 147: /* Line 1806 of yacc.c */ -#line 1185 "moc.y" +#line 1185 "tqmoc.y" { g->className = (yyvsp[(3) - (3)].string); if ( g->className == "TQObject" ) TQ_OBJECTdetected = TRUE; @@ -3529,74 +3529,74 @@ yyreduce: case 148: /* Line 1806 of yacc.c */ -#line 1192 "moc.y" +#line 1192 "tqmoc.y" { g->superClassName = (yyvsp[(2) - (2)].string); } break; case 149: /* Line 1806 of yacc.c */ -#line 1197 "moc.y" +#line 1197 "tqmoc.y" { templateClass = templateClassOld; } break; case 158: /* Line 1806 of yacc.c */ -#line 1220 "moc.y" +#line 1220 "tqmoc.y" { expLevel = 1; } break; case 160: /* Line 1806 of yacc.c */ -#line 1225 "moc.y" +#line 1225 "tqmoc.y" { (yyval.string) = 0; } break; case 161: /* Line 1806 of yacc.c */ -#line 1226 "moc.y" +#line 1226 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 166: /* Line 1806 of yacc.c */ -#line 1238 "moc.y" +#line 1238 "tqmoc.y" { tmpAccess = (yyvsp[(1) - (1)].access); } break; case 167: /* Line 1806 of yacc.c */ -#line 1239 "moc.y" - { moc_err( "Missing access specifier" +#line 1239 "tqmoc.y" + { tqmoc_err( "Missing access specifier" " before \"slots:\"." ); } break; case 168: /* Line 1806 of yacc.c */ -#line 1243 "moc.y" +#line 1243 "tqmoc.y" { BEGIN QT_DEF; } break; case 170: /* Line 1806 of yacc.c */ -#line 1245 "moc.y" +#line 1245 "tqmoc.y" { BEGIN QT_DEF; } break; case 172: /* Line 1806 of yacc.c */ -#line 1247 "moc.y" +#line 1247 "tqmoc.y" { if ( tmpAccess ) - moc_warn("TQ_OBJECT is not in the private" + tqmoc_warn("TQ_OBJECT is not in the private" " section of the class.\n" "TQ_OBJECT is a macro that resets" " access permission to \"private\"."); @@ -3607,7 +3607,7 @@ yyreduce: case 173: /* Line 1806 of yacc.c */ -#line 1255 "moc.y" +#line 1255 "tqmoc.y" { tmpYYStart = YY_START; tmpPropOverride = FALSE; BEGIN IN_PROPERTY; } @@ -3616,7 +3616,7 @@ yyreduce: case 174: /* Line 1806 of yacc.c */ -#line 1258 "moc.y" +#line 1258 "tqmoc.y" { BEGIN tmpYYStart; } @@ -3625,7 +3625,7 @@ yyreduce: case 176: /* Line 1806 of yacc.c */ -#line 1262 "moc.y" +#line 1262 "tqmoc.y" { tmpYYStart = YY_START; tmpPropOverride = TRUE; BEGIN IN_PROPERTY; } @@ -3634,7 +3634,7 @@ yyreduce: case 177: /* Line 1806 of yacc.c */ -#line 1265 "moc.y" +#line 1265 "tqmoc.y" { BEGIN tmpYYStart; } @@ -3643,14 +3643,14 @@ yyreduce: case 179: /* Line 1806 of yacc.c */ -#line 1269 "moc.y" +#line 1269 "tqmoc.y" { tmpYYStart = YY_START; BEGIN IN_CLASSINFO; } break; case 180: /* Line 1806 of yacc.c */ -#line 1271 "moc.y" +#line 1271 "tqmoc.y" { g->infos.append( new ClassInfo( (yyvsp[(4) - (7)].string), (yyvsp[(6) - (7)].string) ) ); BEGIN tmpYYStart; @@ -3660,14 +3660,14 @@ yyreduce: case 182: /* Line 1806 of yacc.c */ -#line 1276 "moc.y" +#line 1276 "tqmoc.y" { tmpYYStart = YY_START; BEGIN IN_PROPERTY; } break; case 183: /* Line 1806 of yacc.c */ -#line 1277 "moc.y" +#line 1277 "tqmoc.y" { TQ_PROPERTYdetected = TRUE; BEGIN tmpYYStart; @@ -3677,14 +3677,14 @@ yyreduce: case 185: /* Line 1806 of yacc.c */ -#line 1282 "moc.y" +#line 1282 "tqmoc.y" { tmpYYStart = YY_START; BEGIN IN_PROPERTY; } break; case 186: /* Line 1806 of yacc.c */ -#line 1283 "moc.y" +#line 1283 "tqmoc.y" { TQ_PROPERTYdetected = TRUE; BEGIN tmpYYStart; @@ -3694,15 +3694,15 @@ yyreduce: case 188: /* Line 1806 of yacc.c */ -#line 1290 "moc.y" - { moc_err( "Signals cannot " +#line 1290 "tqmoc.y" + { tqmoc_err( "Signals cannot " "have access specifiers" ); } break; case 190: /* Line 1806 of yacc.c */ -#line 1293 "moc.y" +#line 1293 "tqmoc.y" { if ( tmpAccess == Public && TQ_PROPERTYdetected ) BEGIN QT_DEF; else @@ -3714,7 +3714,7 @@ yyreduce: case 191: /* Line 1806 of yacc.c */ -#line 1300 "moc.y" +#line 1300 "tqmoc.y" { suppress_func_warn = FALSE; } @@ -3723,10 +3723,10 @@ yyreduce: case 192: /* Line 1806 of yacc.c */ -#line 1303 "moc.y" +#line 1303 "tqmoc.y" { BEGIN IN_CLASS; if ( classPLevel != 1 ) - moc_warn( "unexpected access" + tqmoc_warn( "unexpected access" "specifier" ); } break; @@ -3734,161 +3734,161 @@ yyreduce: case 197: /* Line 1806 of yacc.c */ -#line 1318 "moc.y" +#line 1318 "tqmoc.y" { addMember( PropertyCandidateMember ); } break; case 202: /* Line 1806 of yacc.c */ -#line 1330 "moc.y" +#line 1330 "tqmoc.y" { addMember( SignalMember ); } break; case 207: /* Line 1806 of yacc.c */ -#line 1341 "moc.y" +#line 1341 "tqmoc.y" { addMember( SlotMember ); } break; case 210: /* Line 1806 of yacc.c */ -#line 1348 "moc.y" +#line 1348 "tqmoc.y" { (yyval.string)=(yyvsp[(2) - (2)].string); } break; case 211: /* Line 1806 of yacc.c */ -#line 1351 "moc.y" +#line 1351 "tqmoc.y" { g->multipleSuperClasses.append( (yyvsp[(3) - (3)].string) ); } break; case 213: /* Line 1806 of yacc.c */ -#line 1356 "moc.y" +#line 1356 "tqmoc.y" { (yyval.string) = stradd( (yyvsp[(1) - (4)].string), "(", (yyvsp[(3) - (4)].string), ")" ); } break; case 214: /* Line 1806 of yacc.c */ -#line 1358 "moc.y" +#line 1358 "tqmoc.y" { (yyval.string) = stradd( (yyvsp[(1) - (4)].string), "(", (yyvsp[(3) - (4)].string), ")" ); } break; case 215: /* Line 1806 of yacc.c */ -#line 1361 "moc.y" +#line 1361 "tqmoc.y" {(yyval.string)=(yyvsp[(1) - (1)].string);} break; case 216: /* Line 1806 of yacc.c */ -#line 1362 "moc.y" +#line 1362 "tqmoc.y" {(yyval.string)=(yyvsp[(3) - (3)].string);} break; case 217: /* Line 1806 of yacc.c */ -#line 1363 "moc.y" +#line 1363 "tqmoc.y" {(yyval.string)=(yyvsp[(2) - (2)].string);} break; case 218: /* Line 1806 of yacc.c */ -#line 1364 "moc.y" +#line 1364 "tqmoc.y" {(yyval.string)=(yyvsp[(3) - (3)].string);} break; case 219: /* Line 1806 of yacc.c */ -#line 1365 "moc.y" +#line 1365 "tqmoc.y" {(yyval.string)=(yyvsp[(2) - (2)].string);} break; case 220: /* Line 1806 of yacc.c */ -#line 1366 "moc.y" +#line 1366 "tqmoc.y" {(yyval.string)=(yyvsp[(1) - (1)].string);} break; case 221: /* Line 1806 of yacc.c */ -#line 1367 "moc.y" +#line 1367 "tqmoc.y" {(yyval.string)=(yyvsp[(3) - (3)].string);} break; case 222: /* Line 1806 of yacc.c */ -#line 1368 "moc.y" +#line 1368 "tqmoc.y" {(yyval.string)=(yyvsp[(2) - (2)].string);} break; case 223: /* Line 1806 of yacc.c */ -#line 1369 "moc.y" +#line 1369 "tqmoc.y" {(yyval.string)=(yyvsp[(3) - (3)].string);} break; case 224: /* Line 1806 of yacc.c */ -#line 1370 "moc.y" +#line 1370 "tqmoc.y" {(yyval.string)=(yyvsp[(2) - (2)].string);} break; case 225: /* Line 1806 of yacc.c */ -#line 1373 "moc.y" +#line 1373 "tqmoc.y" { (yyval.access)=Private; } break; case 226: /* Line 1806 of yacc.c */ -#line 1374 "moc.y" +#line 1374 "tqmoc.y" { (yyval.access)=Protected; } break; case 227: /* Line 1806 of yacc.c */ -#line 1375 "moc.y" +#line 1375 "tqmoc.y" { (yyval.access)=Public; } break; case 228: /* Line 1806 of yacc.c */ -#line 1378 "moc.y" +#line 1378 "tqmoc.y" { } break; case 229: /* Line 1806 of yacc.c */ -#line 1379 "moc.y" +#line 1379 "tqmoc.y" { } break; case 271: /* Line 1806 of yacc.c */ -#line 1427 "moc.y" +#line 1427 "tqmoc.y" { tmpFunc->type = (yyvsp[(1) - (2)].string); tmpFunc->name = (yyvsp[(2) - (2)].string); } break; @@ -3896,7 +3896,7 @@ yyreduce: case 272: /* Line 1806 of yacc.c */ -#line 1430 "moc.y" +#line 1430 "tqmoc.y" { tmpFunc->type = "int"; tmpFunc->name = (yyvsp[(1) - (1)].string); if ( tmpFunc->name == g->className ) @@ -3908,7 +3908,7 @@ yyreduce: case 273: /* Line 1806 of yacc.c */ -#line 1437 "moc.y" +#line 1437 "tqmoc.y" { tmpFunc->type = "void"; tmpFunc->name = "~"; tmpFunc->name += (yyvsp[(3) - (3)].string); @@ -3920,7 +3920,7 @@ yyreduce: case 274: /* Line 1806 of yacc.c */ -#line 1445 "moc.y" +#line 1445 "tqmoc.y" { char *tmp = straddSpc((yyvsp[(1) - (5)].string),(yyvsp[(2) - (5)].string),(yyvsp[(3) - (5)].string),(yyvsp[(4) - (5)].string)); @@ -3932,14 +3932,14 @@ yyreduce: case 275: /* Line 1806 of yacc.c */ -#line 1452 "moc.y" +#line 1452 "tqmoc.y" { skipFunc = TRUE; } break; case 276: /* Line 1806 of yacc.c */ -#line 1454 "moc.y" +#line 1454 "tqmoc.y" { tmpFunc->type = straddSpc((yyvsp[(1) - (3)].string),(yyvsp[(2) - (3)].string)); tmpFunc->name = (yyvsp[(3) - (3)].string); } @@ -3948,7 +3948,7 @@ yyreduce: case 277: /* Line 1806 of yacc.c */ -#line 1459 "moc.y" +#line 1459 "tqmoc.y" { tmpFunc->type = straddSpc((yyvsp[(1) - (4)].string),(yyvsp[(2) - (4)].string),(yyvsp[(3) - (4)].string)); tmpFunc->name = (yyvsp[(4) - (4)].string); } @@ -3957,92 +3957,92 @@ yyreduce: case 278: /* Line 1806 of yacc.c */ -#line 1463 "moc.y" +#line 1463 "tqmoc.y" { operatorError(); } break; case 279: /* Line 1806 of yacc.c */ -#line 1465 "moc.y" +#line 1465 "tqmoc.y" { operatorError(); } break; case 280: /* Line 1806 of yacc.c */ -#line 1468 "moc.y" +#line 1468 "tqmoc.y" { operatorError(); } break; case 281: /* Line 1806 of yacc.c */ -#line 1470 "moc.y" +#line 1470 "tqmoc.y" { operatorError(); } break; case 282: /* Line 1806 of yacc.c */ -#line 1473 "moc.y" +#line 1473 "tqmoc.y" { operatorError(); } break; case 284: /* Line 1806 of yacc.c */ -#line 1479 "moc.y" +#line 1479 "tqmoc.y" { func_warn("Unexpected variable declaration."); } break; case 285: /* Line 1806 of yacc.c */ -#line 1482 "moc.y" +#line 1482 "tqmoc.y" { func_warn("Unexpected variable declaration."); } break; case 286: /* Line 1806 of yacc.c */ -#line 1484 "moc.y" +#line 1484 "tqmoc.y" { func_warn("Unexpected enum declaration."); } break; case 287: /* Line 1806 of yacc.c */ -#line 1486 "moc.y" +#line 1486 "tqmoc.y" { func_warn("Unexpected using declaration."); } break; case 288: /* Line 1806 of yacc.c */ -#line 1488 "moc.y" +#line 1488 "tqmoc.y" { func_warn("Unexpected using declaration."); } break; case 289: /* Line 1806 of yacc.c */ -#line 1490 "moc.y" +#line 1490 "tqmoc.y" { classPLevel++; - moc_err("Unexpected namespace declaration."); } + tqmoc_err("Unexpected namespace declaration."); } break; case 290: /* Line 1806 of yacc.c */ -#line 1493 "moc.y" +#line 1493 "tqmoc.y" { func_warn("Unexpected class declaration.");} break; case 291: /* Line 1806 of yacc.c */ -#line 1495 "moc.y" +#line 1495 "tqmoc.y" { func_warn("Unexpected class declaration."); BEGIN IN_FCT; fctLevel=1; } @@ -4051,42 +4051,42 @@ yyreduce: case 292: /* Line 1806 of yacc.c */ -#line 1498 "moc.y" +#line 1498 "tqmoc.y" { BEGIN QT_DEF; } break; case 296: /* Line 1806 of yacc.c */ -#line 1507 "moc.y" +#line 1507 "tqmoc.y" { } break; case 297: /* Line 1806 of yacc.c */ -#line 1508 "moc.y" +#line 1508 "tqmoc.y" { expLevel = 0; } break; case 299: /* Line 1806 of yacc.c */ -#line 1510 "moc.y" +#line 1510 "tqmoc.y" { expLevel = 0; } break; case 302: /* Line 1806 of yacc.c */ -#line 1515 "moc.y" +#line 1515 "tqmoc.y" { expLevel = 0; } break; case 307: /* Line 1806 of yacc.c */ -#line 1530 "moc.y" +#line 1530 "tqmoc.y" { BEGIN QT_DEF; if ( tmpAccess == Public) { tmpEnum->name = (yyvsp[(1) - (5)].string); @@ -4098,42 +4098,42 @@ yyreduce: case 308: /* Line 1806 of yacc.c */ -#line 1537 "moc.y" +#line 1537 "tqmoc.y" { tmpEnum->clear();} break; case 310: /* Line 1806 of yacc.c */ -#line 1541 "moc.y" +#line 1541 "tqmoc.y" { } break; case 314: /* Line 1806 of yacc.c */ -#line 1549 "moc.y" +#line 1549 "tqmoc.y" { if ( tmpAccess == Public) tmpEnum->append( (yyvsp[(1) - (1)].string) ); } break; case 315: /* Line 1806 of yacc.c */ -#line 1550 "moc.y" +#line 1550 "tqmoc.y" { enumLevel=0; } break; case 316: /* Line 1806 of yacc.c */ -#line 1551 "moc.y" +#line 1551 "tqmoc.y" { if ( tmpAccess == Public) tmpEnum->append( (yyvsp[(1) - (4)].string) ); } break; case 317: /* Line 1806 of yacc.c */ -#line 1555 "moc.y" +#line 1555 "tqmoc.y" { g->propWrite = ""; g->propRead = ""; @@ -4154,17 +4154,17 @@ yyreduce: case 318: /* Line 1806 of yacc.c */ -#line 1571 "moc.y" +#line 1571 "tqmoc.y" { if ( g->propRead.isEmpty() && !g->propOverride ) - moc_err( "A property must at least feature a read method." ); + tqmoc_err( "A property must at least feature a read method." ); checkPropertyName( (yyvsp[(2) - (4)].string) ); TQ_PROPERTYdetected = TRUE; // Avoid duplicates for( TQPtrListIterator<Property> lit( g->props ); lit.current(); ++lit ) { if ( lit.current()->name == (yyvsp[(2) - (4)].string) ) { if ( displayWarnings ) - moc_err( "Property '%s' defined twice.", + tqmoc_err( "Property '%s' defined twice.", (const char*)lit.current()->name ); } } @@ -4178,77 +4178,77 @@ yyreduce: case 320: /* Line 1806 of yacc.c */ -#line 1592 "moc.y" +#line 1592 "tqmoc.y" { g->propRead = (yyvsp[(2) - (3)].string); } break; case 321: /* Line 1806 of yacc.c */ -#line 1593 "moc.y" +#line 1593 "tqmoc.y" { g->propWrite = (yyvsp[(2) - (3)].string); } break; case 322: /* Line 1806 of yacc.c */ -#line 1594 "moc.y" +#line 1594 "tqmoc.y" { g->propReset = (yyvsp[(2) - (3)].string); } break; case 323: /* Line 1806 of yacc.c */ -#line 1595 "moc.y" +#line 1595 "tqmoc.y" { g->propStored = (yyvsp[(2) - (3)].string); } break; case 324: /* Line 1806 of yacc.c */ -#line 1596 "moc.y" +#line 1596 "tqmoc.y" { g->propDesignable = (yyvsp[(2) - (3)].string); } break; case 325: /* Line 1806 of yacc.c */ -#line 1597 "moc.y" +#line 1597 "tqmoc.y" { g->propScriptable = (yyvsp[(2) - (3)].string); } break; case 326: /* Line 1806 of yacc.c */ -#line 1600 "moc.y" +#line 1600 "tqmoc.y" { } break; case 327: /* Line 1806 of yacc.c */ -#line 1601 "moc.y" +#line 1601 "tqmoc.y" { g->qtEnums.append( (yyvsp[(1) - (2)].string) ); } break; case 328: /* Line 1806 of yacc.c */ -#line 1604 "moc.y" +#line 1604 "tqmoc.y" { } break; case 329: /* Line 1806 of yacc.c */ -#line 1605 "moc.y" +#line 1605 "tqmoc.y" { g->qtSets.append( (yyvsp[(1) - (2)].string) ); } break; /* Line 1806 of yacc.c */ -#line 4252 "moc_yacc" +#line 4252 "tqmoc_yacc" default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -4479,7 +4479,7 @@ yyreturn: /* Line 2067 of yacc.c */ -#line 1608 "moc.y" +#line 1608 "tqmoc.y" #ifndef YYBISON @@ -4494,7 +4494,7 @@ extern "C" int hack_isatty( int ) # else # include <unistd.h> # endif -# include "moc_lex.cpp" +# include "tqmoc_lex.cpp" #endif //YYBISON void cleanup(); @@ -4548,7 +4548,7 @@ void setDefaultIncludeFile() #define ErrorFormatString "%s:%d:" #endif -#ifndef MOC_MWERKS_PLUGIN +#ifndef TQMOC_MWERKS_PLUGIN int main( int argc, char **argv ) { init(); @@ -4646,21 +4646,21 @@ int main( int argc, char **argv ) } else if ( argc < 2 || error ) { // incomplete/wrong args fprintf( stderr, "TQt meta object compiler\n" ); if ( error ) - fprintf( stderr, "moc: %s\n", error ); - fprintf( stderr, "Usage: moc [options] <header-file>\n" + fprintf( stderr, "tqmoc: %s\n", error ); + fprintf( stderr, "Usage: tqmoc [options] <header-file>\n" "\t-o file Write output to file rather than stdout\n" "\t-f[file] Force #include, optional file name\n" "\t-p path Path prefix for included file\n" "\t-i Do not generate an #include statement\n" "\t-k Do not stop on errors\n" "\t-nw Do not display warnings\n" - "\t-v Display version of moc\n" ); + "\t-v Display version of tqmoc\n" ); cleanup(); return 1; } else { yyin = fopen( (const char *)g->fileName, "r" ); if ( !yyin ) { - fprintf( stderr, "moc: %s: No such file\n", (const char*)g->fileName); + fprintf( stderr, "tqmoc: %s: No such file\n", (const char*)g->fileName); cleanup(); return 1; } @@ -4668,7 +4668,7 @@ int main( int argc, char **argv ) if ( !g->outputFile.isEmpty() ) { // output file specified out = fopen( (const char *)g->outputFile, "w" ); // create output file if ( !out ) { - fprintf( stderr, "moc: Cannot create %s\n", + fprintf( stderr, "tqmoc: Cannot create %s\n", (const char*)g->outputFile ); cleanup(); return 1; @@ -4710,7 +4710,7 @@ const unsigned char *p_str(const char *, int =-1); CWPluginContext g_ctx; -moc_status do_moc( CWPluginContext ctx, const TQCString &fin, const TQCString &fout, CWFileSpec *dspec, bool i) +tqmoc_status do_moc( CWPluginContext ctx, const TQCString &fin, const TQCString &fout, CWFileSpec *dspec, bool i) { init(); @@ -4728,7 +4728,7 @@ moc_status do_moc( CWPluginContext ctx, const TQCString &fin, const TQCString &f fi.isdependentoffile = kCurrentCompiledFile; if(CWFindAndLoadFile( ctx, fin.data(), &fi) != cwNoErr) { cleanup(); - return moc_no_source; + return tqmoc_no_source; } if(dspec) { @@ -4747,7 +4747,7 @@ moc_status do_moc( CWPluginContext ctx, const TQCString &fin, const TQCString &f char tmp[sizeof(Str63)+2]; if(NewAlias( NULL, &fi.filespec, &alias) != noErr) { cleanup(); - return moc_general_error; + return tqmoc_general_error; } for(;;) { GetAliasInfo(alias, x++, str); @@ -4764,18 +4764,18 @@ moc_status do_moc( CWPluginContext ctx, const TQCString &fin, const TQCString &f struct stat istat, ostat; if(stat(inpath, &istat) == -1) { cleanup(); - return moc_no_source; + return tqmoc_no_source; } if(stat(outpath, &ostat) == 0 && istat.st_mtime < ostat.st_mtime) { cleanup(); - return moc_not_time; + return tqmoc_not_time; } unlink(outpath.data()); out = fopen(outpath.data(), "w+"); if(!out) { cleanup(); - return moc_general_error; + return tqmoc_general_error; } yyparse(); @@ -4784,13 +4784,13 @@ moc_status do_moc( CWPluginContext ctx, const TQCString &fin, const TQCString &f if(g->mocError || !g->generatedCode) { unlink(outpath.data()); - moc_status ret = !g->generatedCode ? moc_no_qobject : moc_parse_error; + tqmoc_status ret = !g->generatedCode ? tqmoc_no_qobject : tqmoc_parse_error; cleanup(); return ret; } cleanup(); - return moc_success; + return tqmoc_success; } #endif void replace( char *s, char c1, char c2 ) @@ -4871,7 +4871,7 @@ void init() // initialize tmpFunc = new Function; tmpEnum = new Enum; -#ifdef MOC_MWERKS_PLUGIN +#ifdef TQMOC_MWERKS_PLUGIN buf_buffer = NULL; buf_index = 0; buf_size_total = 0; @@ -4883,7 +4883,7 @@ void cleanup() delete g; g = NULL; -#ifdef MOC_MWERKS_PLUGIN +#ifdef TQMOC_MWERKS_PLUGIN if(buf_buffer && g_ctx) CWReleaseFileText(g_ctx, buf_buffer); #endif @@ -5066,7 +5066,7 @@ void addExpressionChar( const char c ) void yyerror( const char *msg ) // print yacc error message { g->mocError = TRUE; -#ifndef MOC_MWERKS_PLUGIN +#ifndef TQMOC_MWERKS_PLUGIN fprintf( stderr, ErrorFormatString" Error: %s\n", g->fileName.data(), lineNo, msg ); #else char msg2[200]; @@ -5080,25 +5080,25 @@ void yyerror( const char *msg ) // print yacc error message } } -void moc_err( const char *s ) +void tqmoc_err( const char *s ) { yyerror( s ); } -void moc_err( const char *s1, const char *s2 ) +void tqmoc_err( const char *s1, const char *s2 ) { static char tmp[1024]; sprintf( tmp, s1, s2 ); yyerror( tmp ); } -void moc_warn( const char *msg ) +void tqmoc_warn( const char *msg ) { if ( displayWarnings ) fprintf( stderr, ErrorFormatString" Warning: %s\n", g->fileName.data(), lineNo, msg); } -void moc_warn( char *s1, char *s2 ) +void tqmoc_warn( char *s1, char *s2 ) { static char tmp[1024]; sprintf( tmp, s1, s2 ); @@ -5109,14 +5109,14 @@ void moc_warn( char *s1, char *s2 ) void func_warn( const char *msg ) { if ( !suppress_func_warn ) - moc_warn( msg ); + tqmoc_warn( msg ); skipFunc = TRUE; } void operatorError() { if ( !suppress_func_warn ) - moc_warn("Operator functions cannot be signals or slots."); + tqmoc_warn("Operator functions cannot be signals or slots."); skipFunc = TRUE; } @@ -5607,7 +5607,7 @@ int generateProps() // if ( g->props.count() ) { if ( displayWarnings && !TQ_OBJECTdetected ) - moc_err("The declaration of the class \"%s\" contains properties" + tqmoc_err("The declaration of the class \"%s\" contains properties" " but no TQ_OBJECT macro.", g->className.data()); fprintf( out, "#ifndef TQT_NO_PROPERTIES\n" ); @@ -5689,7 +5689,7 @@ int generateClassInfos() return 0; if ( displayWarnings && !TQ_OBJECTdetected ) - moc_err("The declaration of the class \"%s\" contains class infos" + tqmoc_err("The declaration of the class \"%s\" contains class infos" " but no TQ_OBJECT macro.", g->className.data()); fprintf( out, " static const TQClassInfo classinfo_tbl[] = {\n" ); @@ -5720,17 +5720,17 @@ void generateClass() // generate C++ source code for a class if ( g->signals.count() == 0 && g->slots.count() == 0 && g->props.count() == 0 && g->infos.count() == 0 ) return; if ( displayWarnings && (g->signals.count() + g->slots.count()) != 0 ) - moc_err("The declaration of the class \"%s\" contains signals " + tqmoc_err("The declaration of the class \"%s\" contains signals " "or slots\n\t but no TQ_OBJECT macro.", g->className.data()); } else { if ( g->superClassName.isEmpty() ) - moc_err("The declaration of the class \"%s\" contains the\n" + tqmoc_err("The declaration of the class \"%s\" contains the\n" "\tTQ_OBJECT macro but does not inherit from any class!\n" "\tInherit from TQObject or one of its descendants" " or remove TQ_OBJECT.", g->className.data() ); } if ( templateClass ) { // don't generate for class - moc_err( "Sorry, TQt does not support templates that contain\n" + tqmoc_err( "Sorry, TQt does not support templates that contain\n" "\tsignals, slots or TQ_OBJECT." ); return; } @@ -5783,9 +5783,9 @@ void generateClass() // generate C++ source code for a class fprintf( out, "#include <%sntqapplication.h>\n\n", (const char*)g->qtPath ); fprintf( out, "#include <%sprivate/tqucomextra_p.h>\n", (const char*)g->qtPath ); fprintf( out, "#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != %d)\n", formatRevision ); - fprintf( out, "#error \"This file was generated using the moc from %s." + fprintf( out, "#error \"This file was generated using the tqmoc from %s." " It\"\n#error \"cannot be used with the include files from" - " this version of TQt.\"\n#error \"(The moc has changed too" + " this version of TQt.\"\n#error \"(TQMoc has changed too" " much.)\"\n", TQT_VERSION_STR ); fprintf( out, "#endif\n\n" ); } else { @@ -6415,7 +6415,7 @@ void addEnum() if ( lit.current()->name == tmpEnum->name ) { if ( displayWarnings ) - moc_err( "Enum %s defined twice.", (const char*)tmpEnum->name ); + tqmoc_err( "Enum %s defined twice.", (const char*)tmpEnum->name ); } } @@ -6476,7 +6476,7 @@ void addMember( Member m ) void checkPropertyName( const char* ident ) { if ( ident[0] == '_' ) { - moc_err( "Invalid property name '%s'.", ident ); + tqmoc_err( "Invalid property name '%s'.", ident ); return; } } diff --git a/src/moc/moc_yacc.h b/src/tqmoc/tqmoc_yacc.h index 9f47feba0..3a438d372 100644 --- a/src/moc/moc_yacc.h +++ b/src/tqmoc/tqmoc_yacc.h @@ -157,7 +157,7 @@ typedef union YYSTYPE { /* Line 2068 of yacc.c */ -#line 692 "moc.y" +#line 692 "tqmoc.y" char char_val; int int_val; @@ -171,7 +171,7 @@ typedef union YYSTYPE /* Line 2068 of yacc.c */ -#line 175 "moc_yacc.h" +#line 175 "tqmoc_yacc.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ diff --git a/src/widgets/tqtextedit.h b/src/widgets/tqtextedit.h index f58b91d09..5ea273c6e 100644 --- a/src/widgets/tqtextedit.h +++ b/src/widgets/tqtextedit.h @@ -51,7 +51,7 @@ #ifndef TQT_NO_TEXTEDIT // uncomment below to enable optimization mode - also uncomment the -// optimDoAutoScroll() private slot since moc ignores #ifdefs.. +// optimDoAutoScroll() private slot since tqmoc ignores #ifdefs.. #define QT_TEXTEDIT_OPTIMIZATION class TQPainter; |