Revert "tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals"
This reverts commit 0c3ff8ca07.
that was breaking debug and dbgutil build on windows (at least)
Change-Id: Ide58bd4551029bb4e1ef791bb65ad191fbb25cae
This commit is contained in:
@@ -83,6 +83,9 @@ OString RscTypCont::ChangeLanguage(const OString& rNewLang)
|
||||
if (bAppendEnUsFallback)
|
||||
aFallbacks.push_back( "en-US");
|
||||
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
fprintf( stderr, "RscTypCont::ChangeLanguage: " );
|
||||
#endif
|
||||
|
||||
aLangFallbacks.clear();
|
||||
|
||||
@@ -96,11 +99,15 @@ OString RscTypCont::ChangeLanguage(const OString& rNewLang)
|
||||
AddLanguage( aLang.getStr() );
|
||||
nID = GetLangId( aLang );
|
||||
}
|
||||
SAL_INFO("rsc", "RscTypCont::ChangeLanguage: '" <<
|
||||
aLang << "' (0x" << std::hex << nID << ") (" << (bAdd ? "added" : "exists"));
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
fprintf( stderr, " '%s' (0x%hx) (%s)", aLang.getStr(), (int)nID, (bAdd ? "added" : "exists") );
|
||||
#endif
|
||||
aLangFallbacks.push_back( nID);
|
||||
}
|
||||
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
fprintf( stderr, "\n" );
|
||||
#endif
|
||||
|
||||
return aRet;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,9 @@ static RscVerbosity lcl_determineVerbosity( int argc, char ** argv )
|
||||
|
||||
int rsc2_main( int argc, char **argv )
|
||||
{
|
||||
SAL_WARN("rsc", "debugging " << argv[0]);
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
fprintf( stderr, "debugging %s\n", argv[0] );
|
||||
#endif
|
||||
|
||||
ERRTYPE aError;
|
||||
|
||||
|
||||
@@ -96,7 +96,9 @@ RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH )
|
||||
i = 1;
|
||||
while( ppStr && i < (aCmdLine.GetCount() -1) )
|
||||
{
|
||||
SAL_INFO("rsc", "CmdLineArg: \"" << *ppStr << "\"");
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
fprintf( stderr, "CmdLineArg: \"%s\"\n", *ppStr );
|
||||
#endif
|
||||
if (strcmp(*ppStr, "-isystem") == 0)
|
||||
{
|
||||
// ignore "-isystem" and following arg
|
||||
@@ -773,7 +775,9 @@ bool RscCompiler::GetImageFilePath( const RscCmdLine::OutputFile& rOutputFile,
|
||||
bFile = aFS.isRegular();
|
||||
}
|
||||
|
||||
SAL_INFO("rsc", "Searching image: " << aSysPath);
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
fprintf( stderr, "Searching image: %s\n", aSysPath.getStr() );
|
||||
#endif
|
||||
|
||||
if( bFile )
|
||||
{
|
||||
@@ -808,7 +812,9 @@ bool RscCompiler::GetImageFilePath( const RscCmdLine::OutputFile& rOutputFile,
|
||||
fprintf( pSysListFile, "%s\n", rContext.pCmdLine->substitutePaths( aSysPath ).getStr() );
|
||||
}
|
||||
|
||||
SAL_INFO("rsc", "ImagePath to add: " << rImagePath);
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
fprintf( stderr, "ImagePath to add: %s\n", rImagePath.getStr() );
|
||||
#endif
|
||||
}
|
||||
|
||||
++aDirIter;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
/* in cpp1.c: file-pointer auf stdout oder file */
|
||||
extern FILE* pCppOut; /* BP */
|
||||
#define PUTCHAR( d ) fprintf( pCppOut, "%c", (d) ) /* BP */
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
extern FILE* pDefOut; /* ER */
|
||||
#ifdef EVALDEFS
|
||||
#define NEVALBUF 2048
|
||||
@@ -228,7 +228,7 @@ extern char* magic[]; /* Magic predefined symbols */
|
||||
extern FILEINFO* infile; /* Current input file */
|
||||
extern char work[NWORK + 1]; /* #define scratch */
|
||||
extern char* workp; /* Free space in work */
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
extern int debug; /* Debug level */
|
||||
/* ER dump & evaluate #define's */
|
||||
extern int bDumpDefs; /* TRUE if #define's dump req. */
|
||||
@@ -269,7 +269,7 @@ void InitCpp6( void );
|
||||
void output( int c );
|
||||
void sharp( void );
|
||||
void cppmain( void );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
#ifdef EVALDEFS
|
||||
int outputEval( int c );
|
||||
#endif
|
||||
@@ -300,7 +300,7 @@ int expcollect( void );
|
||||
void expstuff( DEFBUF* dp );
|
||||
|
||||
void stparmscan( int delim );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
void dumpparm( char* why );
|
||||
#endif
|
||||
|
||||
@@ -342,7 +342,7 @@ void cwarn( char* format, char* sarg );
|
||||
void cfatal( char* format, char* sarg );
|
||||
void cierror( char* format, int n );
|
||||
void ciwarn( char* format, int n );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
void dumpdef( char* why );
|
||||
void dumpadef( char* why, DEFBUF *dp );
|
||||
#endif
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
FILE* pCppOut = NULL;
|
||||
FILE* pCppIn = NULL;
|
||||
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
FILE* pDefOut = NULL; /* ER evtl. #define's dump */
|
||||
#endif
|
||||
|
||||
@@ -59,7 +59,7 @@ int wrongline; /* Force #line to compiler */
|
||||
char token[IDMAX + 1]; /* Current input token */
|
||||
int errors; /* cpp error counter */
|
||||
FILEINFO* infile = NULL; /* Current input file */
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
int debug; /* TRUE if debugging now */
|
||||
int bDumpDefs; /* TRUE if #define's dump req. */
|
||||
#ifdef EVALDEFS
|
||||
@@ -168,7 +168,7 @@ char* preset[] =
|
||||
#ifdef COMPILER
|
||||
COMPILER,
|
||||
#endif
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
"decus_cpp", /* Ourselves! */
|
||||
#endif
|
||||
NULL /* Must be last */
|
||||
@@ -211,7 +211,7 @@ void InitCpp1()
|
||||
|
||||
pCppOut = stdout;
|
||||
pCppIn = stdin;
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
debug = 0;
|
||||
bDumpDefs = 0;
|
||||
pDefOut = stdout;
|
||||
@@ -260,7 +260,7 @@ int MAIN(int argc, char** argv)
|
||||
}
|
||||
switch (i)
|
||||
{
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
case 4:
|
||||
if ( bDumpDefs )
|
||||
{
|
||||
@@ -320,7 +320,7 @@ int MAIN(int argc, char** argv)
|
||||
|
||||
setincdirs(); /* Setup -I include directories */
|
||||
addfile( pCppIn, work); /* "open" main input file */
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
if (debug > 0 || bDumpDefs)
|
||||
dumpdef("preset #define symbols");
|
||||
#endif
|
||||
@@ -333,7 +333,7 @@ int MAIN(int argc, char** argv)
|
||||
{
|
||||
cierror("Inside #ifdef block at end of input, depth = %d", i);
|
||||
}
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
if( pDefOut != stdout && pDefOut != stderr )
|
||||
fclose( pDefOut );
|
||||
#endif
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#define L_pragma ('p' + ('a' << 1))
|
||||
#define L_undef ('u' + ('d' << 1))
|
||||
#define L_error ('e' + ('r' << 1)) /* BP 5.3.92, #error */
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
#define L_debug ('d' + ('b' << 1)) /* #debug */
|
||||
#define L_nodebug ('n' + ('d' << 1)) /* #nodebug */
|
||||
#endif
|
||||
@@ -89,7 +89,7 @@ int control(int counter)
|
||||
case L_pragma: tp = "pragma"; break;
|
||||
case L_undef: tp = "undef"; break;
|
||||
case L_error: tp = "error"; break;
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
case L_debug: tp = "debug"; break;
|
||||
case L_nodebug: tp = "nodebug"; break;
|
||||
#endif
|
||||
@@ -258,7 +258,7 @@ int control(int counter)
|
||||
unget();
|
||||
break;
|
||||
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
case L_debug:
|
||||
if (debug == 0)
|
||||
dumpdef("debug set on");
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#if (OSL_DEBUG_LEVEL > 0) && (HOST == SYS_UNIX)
|
||||
#if (OSL_DEBUG_LEVEL > 1) && (HOST == SYS_UNIX)
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
@@ -42,13 +42,13 @@ int openfile(char* filename)
|
||||
|
||||
if ((fp = fopen(filename, "r")) == NULL)
|
||||
{
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
if ( debug || !bDumpDefs )
|
||||
perror(filename);
|
||||
#endif
|
||||
return (FALSE);
|
||||
}
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
if (debug)
|
||||
fprintf(stderr, "Reading from \"%s\"\n", filename);
|
||||
#endif
|
||||
@@ -252,7 +252,7 @@ int dooptions(int argc, char** argv)
|
||||
cwarn("\"%s\" wasn't defined", ap);
|
||||
break;
|
||||
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
case 'X': /* Debug */
|
||||
debug = (isdigit(*ap)) ? atoi(ap) : 1;
|
||||
#if (HOST == SYS_UNIX)
|
||||
@@ -262,7 +262,7 @@ int dooptions(int argc, char** argv)
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
case 'P': /* #define's dump */
|
||||
bDumpDefs = 1;
|
||||
fprintf(stderr, "Dump #define's is on\n");
|
||||
@@ -278,7 +278,7 @@ int dooptions(int argc, char** argv)
|
||||
-N\t\t\tDon't predefine target-specific names\n\
|
||||
-Stext\t\tSpecify sizes for #if sizeof\n\
|
||||
-Usymbol\t\tUndefine symbol\n");
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
fprintf(stderr, " -Xvalue\t\tSet internal debug flag\n");
|
||||
fprintf(stderr, " -P\t\t\tdump #define's\n");
|
||||
#endif
|
||||
@@ -286,7 +286,7 @@ int dooptions(int argc, char** argv)
|
||||
} /* Switch on all options */
|
||||
} /* If it's a -option */
|
||||
} /* For all arguments */
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
if ( (bDumpDefs ? j > 4 : j > 3) )
|
||||
#else
|
||||
if (j > 3)
|
||||
@@ -316,7 +316,7 @@ int readoptions(char* filename, char*** pfargv)
|
||||
filename++;
|
||||
if ((fp = fopen(filename, "r")) == NULL)
|
||||
{
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
if ( debug || !bDumpDefs )
|
||||
perror(filename);
|
||||
#endif
|
||||
|
||||
@@ -200,7 +200,7 @@ void dodefine()
|
||||
*workp = EOS; /* Terminate work */
|
||||
dp->repl = savestring(work); /* Save the string */
|
||||
dp->nargs = nargs; /* Save arg count */
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
if (debug)
|
||||
dumpadef("macro definition", dp);
|
||||
else if (bDumpDefs)
|
||||
@@ -372,7 +372,7 @@ void expand(DEFBUF* tokenp)
|
||||
int c;
|
||||
FILEINFO* file;
|
||||
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
if (debug)
|
||||
dumpadef("expand entry", tokenp);
|
||||
#endif
|
||||
@@ -452,7 +452,7 @@ void expand(DEFBUF* tokenp)
|
||||
cwarn("Wrong number of macro arguments for \"%s\"",
|
||||
tokenp->name);
|
||||
}
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
if (debug)
|
||||
dumpparm("expand");
|
||||
#endif
|
||||
@@ -522,7 +522,7 @@ FILE_LOCAL int expcollect()
|
||||
charput(c); /* Store this one */
|
||||
} /* Collect an argument */
|
||||
charput(EOS); /* Terminate argument */
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
if (debug)
|
||||
fprintf( pCppOut, "parm[%d] = \"%s\"\n", nargs, parlist[nargs - 1]);
|
||||
#endif
|
||||
@@ -598,13 +598,13 @@ FILE_LOCAL void expstuff(DEFBUF* tokenp)
|
||||
}
|
||||
}
|
||||
*defp = EOS;
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
if (debug > 1)
|
||||
fprintf( pCppOut, "macroline: \"%s\"\n", file->buffer);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
|
||||
/*
|
||||
* Dump parameter list.
|
||||
|
||||
@@ -624,7 +624,7 @@ DEFBUF* defendel(char* name, int delete)
|
||||
return dp;
|
||||
}
|
||||
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
|
||||
void dumpdef(char* why)
|
||||
{
|
||||
@@ -798,7 +798,7 @@ int get()
|
||||
{
|
||||
if ((file->bptr = fgets(file->buffer, NBUFF, file->fp)) != NULL)
|
||||
{
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
if (debug > 1) /* Dump it to stdout */
|
||||
{
|
||||
fprintf( pCppOut, "\n#line %d (%s), %s",
|
||||
|
||||
Reference in New Issue
Block a user