[Libreoffice-commits] core.git: connectivity/source idlc/source l10ntools/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Feb 27 20:49:38 UTC 2019


 connectivity/source/parse/sqlflex.l |   16 -
 idlc/source/scanner.l               |  422 ++++++++++++++++++------------------
 l10ntools/source/cfglex.l           |  116 ++++-----
 l10ntools/source/xrmlex.l           |  146 ++++++------
 4 files changed, 350 insertions(+), 350 deletions(-)

New commits:
commit 86e0e147984f8ca48ab0a9c88c37e9e4c4274088
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Feb 27 13:16:34 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Feb 27 21:49:09 2019 +0100

    Untabify .l files (to silence loplugin:indentation warnings)
    
    Change-Id: I8368c8a1d52f6c55a8cea952b2b02345e41c1e5c
    Reviewed-on: https://gerrit.libreoffice.org/68448
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/connectivity/source/parse/sqlflex.l b/connectivity/source/parse/sqlflex.l
index 9dfcb98a265b..1002ecef7970 100644
--- a/connectivity/source/parse/sqlflex.l
+++ b/connectivity/source/parse/sqlflex.l
@@ -778,7 +778,7 @@ void OSQLScanner::prepareScan(const OUString & rNewStatement, const IParseContex
 //------------------------------------------------------------------------------
 sal_Int32 OSQLScanner::SQLyygetc(void)
 {
-	sal_Int32 nPos = (m_nCurrentPos >= m_sStatement.getLength()) ? EOF : m_sStatement.getStr()[m_nCurrentPos];
+    sal_Int32 nPos = (m_nCurrentPos >= m_sStatement.getLength()) ? EOF : m_sStatement.getStr()[m_nCurrentPos];
     m_nCurrentPos++;
     return nPos;
 }
@@ -789,18 +789,18 @@ IParseContext::InternationalKeyCode OSQLScanner::getInternationalTokenID(const s
     OSL_ENSURE(m_pContext, "OSQLScanner::getInternationalTokenID: No Context set");
     return (m_bInternational) ? m_pContext->getIntlKeyCode(OString(sToken) ) : IParseContext::InternationalKeyCode::None;
 }
-sal_Int32	OSQLScanner::GetGERRule()		{ return PREDICATE_GER; }
-sal_Int32	OSQLScanner::GetENGRule()		{ return PREDICATE_ENG; }
-sal_Int32	OSQLScanner::GetSQLRule()		{ return SQL; }
-sal_Int32	OSQLScanner::GetDATERule()	{ return DATE; }
-sal_Int32	OSQLScanner::GetSTRINGRule()	{ return STRING; }
+sal_Int32   OSQLScanner::GetGERRule()       { return PREDICATE_GER; }
+sal_Int32   OSQLScanner::GetENGRule()       { return PREDICATE_ENG; }
+sal_Int32   OSQLScanner::GetSQLRule()       { return SQL; }
+sal_Int32   OSQLScanner::GetDATERule()  { return DATE; }
+sal_Int32   OSQLScanner::GetSTRINGRule()    { return STRING; }
 void OSQLScanner::setScanner(bool _bNull)
 {
-	xxx_pGLOBAL_SQLSCAN = _bNull ? nullptr : this;
+    xxx_pGLOBAL_SQLSCAN = _bNull ? nullptr : this;
 }
 sal_Int32 OSQLScanner::SQLlex()
 {
-	return SQLyylex();
+    return SQLyylex();
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/idlc/source/scanner.l b/idlc/source/scanner.l
index 91bf9f2646a6..40f3670f78f5 100644
--- a/idlc/source/scanner.l
+++ b/idlc/source/scanner.l
@@ -58,8 +58,8 @@ int yycolumn = 1;
 #define YY_USER_ACTION idlc()->setOffset(yycolumn, yycolumn+yyleng-1); \
     yycolumn += yyleng;
 
-sal_Int32		beginLine = 0;
-OString	docu;
+sal_Int32       beginLine = 0;
+OString docu;
 
 static int asciiToInteger(char const * s, sal_Int64  * sval, sal_uInt64 * uval) {
     bool neg = false;
@@ -148,105 +148,105 @@ static int asciiToInteger(char const * s, sal_Int64  * sval, sal_uInt64 * uval)
 
 static double asciiToFloat(const sal_Char *s)
 {
-   	double  	d = 0.0;
-   	double  	e, k;
-   	sal_Int32  	neg = 0;
-
-   	if (*s == '-')
-   	{
-    	neg = 1;
-       	s++;
-   	}
-   	while (*s >= '0' && *s <= '9')
-   	{
-    	d = (d * 10) + *s - '0';
-       	s++;
-   	}
-   	if (*s == '.')
-   	{
-    	s++;
-       	e = 10;
-       	while (*s >= '0' && *s <= '9')
-       	{
-        	d += (*s - '0') / (e * 1.0);
-           	e *= 10;
-           	s++;
-       	}
-   	}
-   	if (*s == 'e' || *s == 'E')
-   	{
-    	s++;
-       	if (*s == '-')
+    double      d = 0.0;
+    double      e, k;
+    sal_Int32   neg = 0;
+
+    if (*s == '-')
+    {
+        neg = 1;
+        s++;
+    }
+    while (*s >= '0' && *s <= '9')
+    {
+        d = (d * 10) + *s - '0';
+        s++;
+    }
+    if (*s == '.')
+    {
+        s++;
+        e = 10;
+        while (*s >= '0' && *s <= '9')
+        {
+            d += (*s - '0') / (e * 1.0);
+            e *= 10;
+            s++;
+        }
+    }
+    if (*s == 'e' || *s == 'E')
+    {
+        s++;
+        if (*s == '-')
+        {
+            s++;
+        } else
         {
-           	s++;
-       	} else
-       	{
-        	if (*s == '+')
-            	s++;
-           	e = 0;
-           	while (*s >= '0' && *s <= '9')
-           	{
-            	e = (e * 10) + *s - '0';
-             	s++;
-           	}
-           	if (e > 0)
-           	{
+            if (*s == '+')
+                s++;
+            e = 0;
+            while (*s >= '0' && *s <= '9')
+            {
+                e = (e * 10) + *s - '0';
+                s++;
+            }
+            if (e > 0)
+            {
                 for (k = 1; e > 0; k *= 10, e--)
                     ;
                 d /= k;
-           	}
-		}
-   	}
-   	if (neg) d *= -1.0;
-   	return d;
+            }
+        }
+    }
+    if (neg) d *= -1.0;
+    return d;
 }
 
-static void	idlParsePragma(sal_Char* pPragma)
+static void idlParsePragma(sal_Char* pPragma)
 {
-	OString pragma(pPragma);
-	sal_Int32 index = pragma.indexOf("include");
-	sal_Char* begin = pPragma + index + 8;
-	sal_Char* offset = begin;
-	while (*offset != ',') offset++;
-	//OString include = pragma.copy(index + 8, offset - begin);
-	//unused// idlc()->insertInclude(pragma.copy(index + 8, (sal_Int32)(offset - begin)));
-}	
+    OString pragma(pPragma);
+    sal_Int32 index = pragma.indexOf("include");
+    sal_Char* begin = pPragma + index + 8;
+    sal_Char* offset = begin;
+    while (*offset != ',') offset++;
+    //OString include = pragma.copy(index + 8, offset - begin);
+    //unused// idlc()->insertInclude(pragma.copy(index + 8, (sal_Int32)(offset - begin)));
+}   
 
 static void parseLineAndFile(sal_Char* pBuf)
 {
-	sal_Char	*r = pBuf;
-	sal_Char    *h;
-	bool	bIsInMain = false;
-
-	/* Skip initial '#' */
-	if (*r != '#')
-		return;
-
-	/* Find line number */
-	for (r++; *r == ' ' || *r == '\t' || rtl::isAsciiAlpha(static_cast<unsigned char>(*r)); r++) ;
-	h = r;
-	for (; *r != '\0' && *r != ' ' && *r != '\t'; r++) ;
-	*r++ = 0;
-	idlc()->setLineNumber((sal_uInt32)atol(h));
+    sal_Char    *r = pBuf;
+    sal_Char    *h;
+    bool    bIsInMain = false;
+
+    /* Skip initial '#' */
+    if (*r != '#')
+        return;
+
+    /* Find line number */
+    for (r++; *r == ' ' || *r == '\t' || rtl::isAsciiAlpha(static_cast<unsigned char>(*r)); r++) ;
+    h = r;
+    for (; *r != '\0' && *r != ' ' && *r != '\t'; r++) ;
+    *r++ = 0;
+    idlc()->setLineNumber((sal_uInt32)atol(h));
     yylineno = atol(h);
 
-	/* Find file name, if present */
-	for (; *r != '"'; r++)
-	{
-		if (*r == '\n' || *r == '\0')
-			return;
-	}
-	h = ++r;
-	for (; *r != '"'; r++) ;
-	*r = 0;
-	if (*h == '\0')
-		idlc()->setFileName(OString("standard input"));
-	else
-		idlc()->setFileName(OString(h));
-
-	bIsInMain = idlc()->getFileName() == idlc()->getRealFileName();
-	idlc()->setInMainfile(bIsInMain);		
-}	
+    /* Find file name, if present */
+    for (; *r != '"'; r++)
+    {
+        if (*r == '\n' || *r == '\0')
+            return;
+    }
+    h = ++r;
+    for (; *r != '"'; r++) ;
+    *r = 0;
+    if (*h == '\0')
+        idlc()->setFileName(OString("standard input"));
+    else
+        idlc()->setFileName(OString(h));
+
+    bIsInMain = idlc()->getFileName() == idlc()->getRealFileName();
+    idlc()->setInMainfile(bIsInMain);       
+}   
 
 // Suppress any warnings from generated code:
 #ifdef __GNUC__
@@ -283,7 +283,7 @@ IDENTIFIER      ("_"?({ALPHA}|{DIGIT})+)*
 
 %%
 
-[ \t\r]+	; /* eat up whitespace */
+[ \t\r]+    ; /* eat up whitespace */
 [\n]           {
        idlc()->incLineNumber();
        yycolumn = 1;
@@ -316,7 +316,7 @@ struct          return IDL_STRUCT;
 transient       return IDL_TRANSIENT;
 typedef         return IDL_TYPEDEF;
 
-any             return IDL_ANY;				
+any             return IDL_ANY;             
 boolean         return IDL_BOOLEAN;
 byte            return IDL_BYTE;
 char            return IDL_CHAR;
@@ -358,165 +358,165 @@ published       return IDL_PUBLISHED;
                 return asciiToInteger(yytext, &yylval.ival, &yylval.uval);
             }
 
-("-")?{DIGIT}+(e|E)(("+"|"-")?{DIGIT}+)?(f|F)?	|
+("-")?{DIGIT}+(e|E)(("+"|"-")?{DIGIT}+)?(f|F)?  |
 ("-")?{DIGIT}*"."{DIGIT}+((e|E)("+"|"-")?{DIGIT}+)?(f|F)?        {
                 yylval.dval = asciiToFloat( yytext );
-				return IDL_FLOATING_PT_LITERAL;
+                return IDL_FLOATING_PT_LITERAL;
+            }
+
+{IDENTIFIER}    {
+                yylval.sval = new OString(yytext);
+                return IDL_IDENTIFIER;
+            }
+
+\<\<    {
+        yylval.strval = yytext;
+        return IDL_LEFTSHIFT;
+    }
+\>\>    {
+        yylval.strval = yytext;
+        return IDL_RIGHTSHIFT;
+    }
+\:\:    {
+        yylval.strval = yytext;
+        return IDL_SCOPESEPARATOR;
+    }
+
+"/*"    { 
+            BEGIN( COMMENT );
+            docu = OString();
+            beginLine = idlc()->getLineNumber();
+        }
+
+"/***"  { 
+            BEGIN( COMMENT );
+            docu = OString();
+            beginLine = idlc()->getLineNumber();
+        }
+
+<COMMENT>[^*]+  {
+                docu += OString(yytext);
+            } 
+
+<COMMENT>"*"[^*/]+  {
+                docu += OString(yytext);
             }
 
-{IDENTIFIER}	{
-				yylval.sval = new OString(yytext);
-				return IDL_IDENTIFIER;
-			}
-
-\<\<  	{
-		yylval.strval = yytext;
-		return IDL_LEFTSHIFT;
-	}
-\>\>	{
-		yylval.strval = yytext;
-		return IDL_RIGHTSHIFT;
-	}
-\:\:	{
-		yylval.strval = yytext;
-		return IDL_SCOPESEPARATOR;
-	}
-
-"/*"	{ 
-			BEGIN( COMMENT );
-			docu = OString();
-			beginLine = idlc()->getLineNumber();
-		}
-
-"/***"	{ 
-			BEGIN( COMMENT );
-			docu = OString();
-			beginLine = idlc()->getLineNumber();
-		}
-
-<COMMENT>[^*]+	{
-				docu += OString(yytext);
-			} 
-
-<COMMENT>"*"[^*/]+ 	{
-				docu += OString(yytext);
-			}
-
-<COMMENT>"**" 	{
-				docu += OString(yytext);
-			}
+<COMMENT>"**"   {
+                docu += OString(yytext);
+            }
 
 <COMMENT>[*]+"/"  {
-				docu = docu.trim();
+                docu = docu.trim();
+                sal_Int32 nIndex = 0;
+                int count = 0;
+                do { docu.getToken( 0, '\n', nIndex ); count++; } while( nIndex != -1 );
+                idlc()->setLineNumber( beginLine + count - 1);
+                BEGIN( INITIAL );
+            }
+
+"/**"   {
+            BEGIN( DOCU );
+            docu = OString();
+            beginLine = idlc()->getLineNumber();
+        }
+
+<DOCU>[^*\n]+   {
+                docu += OString(yytext);
+            }
+
+<DOCU>"\n"[ \t]*"*"{1}  {
+                idlc()->setLineNumber( idlc()->getLineNumber()  + 1);
+                docu += OString("\n");
+            }
+
+<DOCU>"\n"  {
+                idlc()->setLineNumber( idlc()->getLineNumber()  + 1);
+                docu += OString(yytext);
+            }
+
+<DOCU>"*"[^*^/\n]*  {
+                docu += OString(yytext);
+            }
+
+<DOCU>"\n"[ \t]*"*/"    {
+                docu = docu.trim();
                 sal_Int32 nIndex = 0;
                 int count = 0;
                 do { docu.getToken( 0, '\n', nIndex ); count++; } while( nIndex != -1 );
-				idlc()->setLineNumber( beginLine + count - 1);
-			  	BEGIN( INITIAL );
-			}
-
-"/**"	{
-			BEGIN( DOCU );
-			docu = OString();
-			beginLine = idlc()->getLineNumber();
-		}
-
-<DOCU>[^*\n]+	{
-				docu += OString(yytext);
-			}
-
-<DOCU>"\n"[ \t]*"*"{1} 	{
-				idlc()->setLineNumber( idlc()->getLineNumber()  + 1);
-				docu += OString("\n");
-			}
-
-<DOCU>"\n"	{
-				idlc()->setLineNumber( idlc()->getLineNumber()  + 1);
-				docu += OString(yytext);
-			}
-
-<DOCU>"*"[^*^/\n]* 	{
-				docu += OString(yytext);
-			}
-
-<DOCU>"\n"[ \t]*"*/" 	{
-				docu = docu.trim();
-				sal_Int32 nIndex = 0;
-				int count = 0;
-				do { docu.getToken( 0, '\n', nIndex ); count++; } while( nIndex != -1 );
-				idlc()->setLineNumber( beginLine + count - 1);                
-				if ( (nIndex = docu.indexOf("/*")) >= 0 || (nIndex = docu.indexOf("///")) >= 0 )
-				{
+                idlc()->setLineNumber( beginLine + count - 1);                
+                if ( (nIndex = docu.indexOf("/*")) >= 0 || (nIndex = docu.indexOf("///")) >= 0 )
+                {
                     if ( 0 != nIndex &&
                          (docu[nIndex - 1] != '"' && docu[nIndex - 1] != ':') )
                         ErrorHandler::syntaxError(PS_NoState, idlc()->getLineNumber(),
                                                      "nested documentation strings are not allowed!");
-				}
-				idlc()->setDocumentation(docu);
-			  	BEGIN( INITIAL );
-			}
-
-<DOCU>"*/"	{
-				docu = docu.trim();
-				sal_Int32 nIndex = 0;
-				int count = 0;
-				do { docu.getToken( 0, '\n', nIndex ); count++; } while( nIndex != -1 );
-				idlc()->setLineNumber( beginLine + count - 1);
-				if ( docu.indexOf("/*") >= 0 || docu.indexOf("//") >= 0 )
-				{
+                }
+                idlc()->setDocumentation(docu);
+                BEGIN( INITIAL );
+            }
+
+<DOCU>"*/"  {
+                docu = docu.trim();
+                sal_Int32 nIndex = 0;
+                int count = 0;
+                do { docu.getToken( 0, '\n', nIndex ); count++; } while( nIndex != -1 );
+                idlc()->setLineNumber( beginLine + count - 1);
+                if ( docu.indexOf("/*") >= 0 || docu.indexOf("//") >= 0 )
+                {
                     if ( 0 != nIndex &&
                          (docu[nIndex - 1] != '"' && docu[nIndex - 1] != ':') )
                         ErrorHandler::syntaxError(PS_NoState, idlc()->getLineNumber(),
                                                      "nested documentation strings are not allowed!");
-				}
-				idlc()->setDocumentation(docu);
-			  	BEGIN( INITIAL );
-			}
+                }
+                idlc()->setDocumentation(docu);
+                BEGIN( INITIAL );
+            }
 
 "//"[^/]{1}.*"\n" {
-				/* only a comment */
-				OString docStr(yytext);
-				docStr = docStr.copy( 0, docStr.lastIndexOf('\n') );
-				docStr = docStr.copy( docStr.lastIndexOf('/')+1 );
-				docStr = docStr.trim();
-				idlc()->incLineNumber();
-			}
+                /* only a comment */
+                OString docStr(yytext);
+                docStr = docStr.copy( 0, docStr.lastIndexOf('\n') );
+                docStr = docStr.copy( docStr.lastIndexOf('/')+1 );
+                docStr = docStr.trim();
+                idlc()->incLineNumber();
+            }
 
 "///".*"\n"  {
-				OString docStr(yytext);
-				docStr = docStr.copy( 0, docStr.lastIndexOf('\n') );
-				docStr = docStr.copy( docStr.lastIndexOf('/')+1 );
-				docStr = docStr.trim();
-				idlc()->incLineNumber();
-				idlc()->setDocumentation(docStr);
-			}
+                OString docStr(yytext);
+                docStr = docStr.copy( 0, docStr.lastIndexOf('\n') );
+                docStr = docStr.copy( docStr.lastIndexOf('/')+1 );
+                docStr = docStr.trim();
+                idlc()->incLineNumber();
+                idlc()->setDocumentation(docStr);
+            }
 
-.	return yytext[0];
+.   return yytext[0];
 
 ^#[ \t]*line[ \t]*[0-9]*" ""\""[^\"]*"\""\n    {
-	parseLineAndFile(yytext);
+    parseLineAndFile(yytext);
 }
 
 ^#[ \t]*[0-9]*" ""\""[^\"]*"\""" "[0-9]*\n {
-	parseLineAndFile(yytext);
+    parseLineAndFile(yytext);
 }
 
 ^#[ \t]*[0-9]*" ""\""[^\"]*"\""\n {
-	parseLineAndFile(yytext);
+    parseLineAndFile(yytext);
 }
 
 ^#[ \t]*[0-9]*\n {
-	parseLineAndFile(yytext);
+    parseLineAndFile(yytext);
 }
 
 ^#[ \t]*ident.*\n {
-	/* ignore cpp ident */
-	idlc()->incLineNumber();
+    /* ignore cpp ident */
+    idlc()->incLineNumber();
 }
 
 ^#[ \t]*pragma[ \t].*\n        {       /* remember pragma */
-	idlParsePragma(yytext);
-	idlc()->incLineNumber();
+    idlParsePragma(yytext);
+    idlc()->incLineNumber();
 }
 
 %%
diff --git a/l10ntools/source/cfglex.l b/l10ntools/source/cfglex.l
index 8b19ad61466c..f8afa3f82607 100644
--- a/l10ntools/source/cfglex.l
+++ b/l10ntools/source/cfglex.l
@@ -30,9 +30,9 @@
 #define YYLMAX 64000
 
 /* to enable debug output define LEXDEBUG */
-#define LEXDEBUG		1
+#define LEXDEBUG        1
 #ifdef LEXDEBUG
-#define OUTPUT	fprintf
+#define OUTPUT  fprintf
 #else
 #define OUTPUT(Par1,Par2);
 #endif
@@ -63,105 +63,105 @@ int bText=0;
 
 %%
 
-\<[^\>]*"xml:lang="\""x-no-translate"\"[^\<]*\/\>	{
-	bText = 0;
-	workOnTokenSet( CFG_TOKEN_NO_TRANSLATE, yytext );
+\<[^\>]*"xml:lang="\""x-no-translate"\"[^\<]*\/\>   {
+    bText = 0;
+    workOnTokenSet( CFG_TOKEN_NO_TRANSLATE, yytext );
 }
 
 \<.*\/\> {
-	bText = 0;
-	workOnTokenSet( ANYTOKEN, yytext );
+    bText = 0;
+    workOnTokenSet( ANYTOKEN, yytext );
 }
 
-\<[^\>]*"xml:lang="\".*\"[^\<]*\>	{
-	bText = 1;
-	workOnTokenSet( CFG_TEXT_START, yytext );
+\<[^\>]*"xml:lang="\".*\"[^\<]*\>   {
+    bText = 1;
+    workOnTokenSet( CFG_TEXT_START, yytext );
 }
 
 
-\<[^\/\!][^\>]*\>	{
-	bText = 0;
-	workOnTokenSet( CFG_TAG, yytext );
+\<[^\/\!][^\>]*\>   {
+    bText = 0;
+    workOnTokenSet( CFG_TAG, yytext );
 }
 
-"<!"DOCTYPE[^\>]*\>	{
-	bText = 0;
-	workOnTokenSet( CFG_TAG, yytext );
+"<!"DOCTYPE[^\>]*\> {
+    bText = 0;
+    workOnTokenSet( CFG_TAG, yytext );
 }
 
 
-\<\!\-\-	{
-	char c1 = 0, c2 = 0;
-	int c3 = yyinput();
-	char pChar[2];
-	pChar[1] = 0x00;
-	pChar[0] = c3;
-
-	workOnTokenSet( COMMENT, yytext );
-	workOnTokenSet( COMMENT, pChar );
-
-	for(;;) {
-		if ( c3 == EOF )
-			break;
-		if ( c1 == '-' && c2 == '-' && c3 == '>' )
-			break;
-		c1 = c2;
-		c2 = c3;
-		c3 = yyinput();
-
-		pChar[0] = c3;
-		workOnTokenSet( COMMENT, pChar );
-	}
+\<\!\-\-    {
+    char c1 = 0, c2 = 0;
+    int c3 = yyinput();
+    char pChar[2];
+    pChar[1] = 0x00;
+    pChar[0] = c3;
+
+    workOnTokenSet( COMMENT, yytext );
+    workOnTokenSet( COMMENT, pChar );
+
+    for(;;) {
+        if ( c3 == EOF )
+            break;
+        if ( c1 == '-' && c2 == '-' && c3 == '>' )
+            break;
+        c1 = c2;
+        c2 = c3;
+        c3 = yyinput();
+
+        pChar[0] = c3;
+        workOnTokenSet( COMMENT, pChar );
+    }
 }
 
 \<\/[^\>]*\> {
-	bText = 0;
-	workOnTokenSet( CFG_CLOSETAG, yytext );
+    bText = 0;
+    workOnTokenSet( CFG_CLOSETAG, yytext );
 }
 
 \<[^\>\!]*\> {
-	bText = 0;
-	if ( yytext[ 1 ] == '!' && yytext[ 2 ] == '-' && yytext[ 3 ] == '-' )
-		workOnTokenSet( COMMENT, yytext );
-	else
-		workOnTokenSet( CFG_UNKNOWNTAG, yytext );
+    bText = 0;
+    if ( yytext[ 1 ] == '!' && yytext[ 2 ] == '-' && yytext[ 3 ] == '-' )
+        workOnTokenSet( COMMENT, yytext );
+    else
+        workOnTokenSet( CFG_UNKNOWNTAG, yytext );
 }
 
 .|\n {
     yycolumn = 1;
-	if ( bText == 1 )
-		workOnTokenSet( CFG_TEXTCHAR, yytext );
-	else
-		workOnTokenSet( UNKNOWNCHAR, yytext );
+    if ( bText == 1 )
+        workOnTokenSet( CFG_TEXTCHAR, yytext );
+    else
+        workOnTokenSet( UNKNOWNCHAR, yytext );
 }
 
 
 %%
 
 /*****************************************************************************/
-int	yywrap(void)
+int yywrap(void)
 /*****************************************************************************/
 {
-	return 1;
+    return 1;
 }
 
 /*****************************************************************************/
 void YYWarning( const char *s )
 /*****************************************************************************/
 {
-	/* write warning to stderr */
-	fprintf( stderr,
-		"Warning: \"%s\" in line %d, column %d: \"%s\"\n", s, yylineno, yycolumn, yytext  );
+    /* write warning to stderr */
+    fprintf( stderr,
+        "Warning: \"%s\" in line %d, column %d: \"%s\"\n", s, yylineno, yycolumn, yytext  );
 }
 
 /*****************************************************************************/
 void yyerror ( const char *s )
 /*****************************************************************************/
 {
-	/* write error to stderr */
-	fprintf( stderr,
-		"Error: \"%s\" in line %d, column %d: \"%s\"\n", s, yylineno, yycolumn, yytext  );
-	exit(EXIT_FAILURE);
+    /* write error to stderr */
+    fprintf( stderr,
+        "Error: \"%s\" in line %d, column %d: \"%s\"\n", s, yylineno, yycolumn, yytext  );
+    exit(EXIT_FAILURE);
 }
 
 SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) {
diff --git a/l10ntools/source/xrmlex.l b/l10ntools/source/xrmlex.l
index 34f37aa8f74b..c5ab75a14a5a 100644
--- a/l10ntools/source/xrmlex.l
+++ b/l10ntools/source/xrmlex.l
@@ -30,9 +30,9 @@
 #define YYLMAX 64000
 
 /* to enable debug output define LEXDEBUG */
-#define LEXDEBUG		1
+#define LEXDEBUG        1
 #ifdef LEXDEBUG
-#define OUTPUT	fprintf
+#define OUTPUT  fprintf
 #else
 #define OUTPUT(Par1,Par2);
 #endif
@@ -63,167 +63,167 @@ int bText=0;
 %%
 
 "<p "[^\>]*xml:lang[^\>]*\> {
-	WorkOnTokenSet( XRM_TEXT_START , yytext );
+    WorkOnTokenSet( XRM_TEXT_START , yytext );
 }
 
 "</p>" {
-	WorkOnTokenSet( XRM_TEXT_END, yytext );
+    WorkOnTokenSet( XRM_TEXT_END, yytext );
 }
 
 "<h1 "[^\>]*xml:lang[^\>]*\> {
-	WorkOnTokenSet( XRM_TEXT_START , yytext );
+    WorkOnTokenSet( XRM_TEXT_START , yytext );
 }
 
 "</h1>" {
-	WorkOnTokenSet( XRM_TEXT_END, yytext );
+    WorkOnTokenSet( XRM_TEXT_END, yytext );
 }
 "<h2 "[^\>]*xml:lang[^\>]*\> {
-	WorkOnTokenSet( XRM_TEXT_START , yytext );
+    WorkOnTokenSet( XRM_TEXT_START , yytext );
 }
 
 "</h2>" {
-	WorkOnTokenSet( XRM_TEXT_END, yytext );
+    WorkOnTokenSet( XRM_TEXT_END, yytext );
 }
 "<h3 "[^\>]*xml:lang[^\>]*\> {
-	WorkOnTokenSet( XRM_TEXT_START , yytext );
+    WorkOnTokenSet( XRM_TEXT_START , yytext );
 }
 
 "</h3>" {
-	WorkOnTokenSet( XRM_TEXT_END, yytext );
+    WorkOnTokenSet( XRM_TEXT_END, yytext );
 }
 "<h4 "[^\>]*xml:lang[^\>]*\> {
-	WorkOnTokenSet( XRM_TEXT_START , yytext );
+    WorkOnTokenSet( XRM_TEXT_START , yytext );
 }
 
 "</h4>" {
-	WorkOnTokenSet( XRM_TEXT_END, yytext );
+    WorkOnTokenSet( XRM_TEXT_END, yytext );
 }
 "<h5 "[^\>]*xml:lang[^\>]*\> {
-	WorkOnTokenSet( XRM_TEXT_START , yytext );
+    WorkOnTokenSet( XRM_TEXT_START , yytext );
 }
 
 "</h5>" {
-	WorkOnTokenSet( XRM_TEXT_END, yytext );
+    WorkOnTokenSet( XRM_TEXT_END, yytext );
 }
 
 "<display-name>" {
-	WorkOnTokenSet( DESC_DISPLAY_NAME_START , yytext );
+    WorkOnTokenSet( DESC_DISPLAY_NAME_START , yytext );
 }
 
 "</display-name>" {
-	WorkOnTokenSet( DESC_DISPLAY_NAME_END, yytext );
+    WorkOnTokenSet( DESC_DISPLAY_NAME_END, yytext );
 }
 
 "<name "[^\>]*lang[^\>]*\> {
-	WorkOnTokenSet( DESC_TEXT_START , yytext );
+    WorkOnTokenSet( DESC_TEXT_START , yytext );
 }
 
 "</name>" {
-	WorkOnTokenSet( DESC_TEXT_END, yytext );
+    WorkOnTokenSet( DESC_TEXT_END, yytext );
 }
 
 "<extension-description>" {
-	WorkOnTokenSet( DESC_EXTENSION_DESCRIPTION_START , yytext );
+    WorkOnTokenSet( DESC_EXTENSION_DESCRIPTION_START , yytext );
 }
 
 "</extension-description>" {
-	WorkOnTokenSet( DESC_EXTENSION_DESCRIPTION_END , yytext );
+    WorkOnTokenSet( DESC_EXTENSION_DESCRIPTION_END , yytext );
 }
 
 "<src "[^\>]*lang[^\>]*\> {
-	WorkOnTokenSet( DESC_EXTENSION_DESCRIPTION_SRC , yytext );
+    WorkOnTokenSet( DESC_EXTENSION_DESCRIPTION_SRC , yytext );
 }
 
 
 
-"<!--"	{
-	char c1 = 0, c2 = 0;
-	int c3 = yyinput();
-	char pChar[2];
-	pChar[1] = 0x00;
-	pChar[0] = c3;
+"<!--"  {
+    char c1 = 0, c2 = 0;
+    int c3 = yyinput();
+    char pChar[2];
+    pChar[1] = 0x00;
+    pChar[0] = c3;
 
-	WorkOnTokenSet( COMMENT, yytext );
-	WorkOnTokenSet( COMMENT, pChar );
+    WorkOnTokenSet( COMMENT, yytext );
+    WorkOnTokenSet( COMMENT, pChar );
 
-	for(;;) {
-		if ( c3 == EOF )
-			break;
-		if ( c1 == '-' && c2 == '-' && c3 == '>' )
-			break;
-		c1 = c2;
-		c2 = c3;
-		c3 = yyinput();
-		pChar[0] = c3;
-		WorkOnTokenSet( COMMENT, pChar );
-	}
+    for(;;) {
+        if ( c3 == EOF )
+            break;
+        if ( c1 == '-' && c2 == '-' && c3 == '>' )
+            break;
+        c1 = c2;
+        c2 = c3;
+        c3 = yyinput();
+        pChar[0] = c3;
+        WorkOnTokenSet( COMMENT, pChar );
+    }
 }
 
 .|\n {
-	if ( bText == 1 )
-		WorkOnTokenSet( XML_TEXTCHAR, yytext );
-	else
-		WorkOnTokenSet( UNKNOWNCHAR, yytext );
+    if ( bText == 1 )
+        WorkOnTokenSet( XML_TEXTCHAR, yytext );
+    else
+        WorkOnTokenSet( UNKNOWNCHAR, yytext );
 }
 
 
 %%
 
 /*****************************************************************************/
-int	yywrap(void)
+int yywrap(void)
 /*****************************************************************************/
 {
-	return 1;
+    return 1;
 }
 
 /*****************************************************************************/
 void YYWarning( const char *s )
 /*****************************************************************************/
 {
-	/* write warning to stderr */
-	fprintf( stderr,
-		"Warning: \"%s\" in line %d: \"%s\"\n", s, yylineno, yytext  );
+    /* write warning to stderr */
+    fprintf( stderr,
+        "Warning: \"%s\" in line %d: \"%s\"\n", s, yylineno, yytext  );
 }
 
 /*****************************************************************************/
 void yyerror ( const char *s )
 /*****************************************************************************/
 {
-	/* write error to stderr */
-	fprintf( stderr,
-		"Error: \"%s\" in line %d: \"%s\"\n", s, yylineno, yytext  );
-	SetError();
+    /* write error to stderr */
+    fprintf( stderr,
+        "Error: \"%s\" in line %d: \"%s\"\n", s, yylineno, yytext  );
+    SetError();
 }
 
 SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) {
-	/* error level */
-	int nRetValue = 0;
-	FILE *pFile;
+    /* error level */
+    int nRetValue = 0;
+    FILE *pFile;
 
-	if ( !GetOutputFile( argc, argv ) )
-	{
-		return 1;
-	}
-	pFile = GetXrmFile();
-	InitXrmExport( getFilename() );
+    if ( !GetOutputFile( argc, argv ) )
+    {
+        return 1;
+    }
+    pFile = GetXrmFile();
+    InitXrmExport( getFilename() );
 
     if ( !pFile )
-		return 1;
+        return 1;
 
-   	yyin = pFile;
+    yyin = pFile;
 
-	/* create global instance of class XmlExport */
-	//InitXrmExport( pOutput );
+    /* create global instance of class XmlExport */
+    //InitXrmExport( pOutput );
 
-	/* start parser */
-   	yylex();
+    /* start parser */
+    yylex();
 
-	/* get error info. and end export */
-	nRetValue = GetError();
-	EndXrmExport();
+    /* get error info. and end export */
+    nRetValue = GetError();
+    EndXrmExport();
 
-	/* return error level */
-	return nRetValue;
+    /* return error level */
+    return nRetValue;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */


More information about the Libreoffice-commits mailing list