You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ms...@apache.org on 2021/08/22 00:24:08 UTC

[openoffice] branch trunk updated: Fixed typo (COMMEND -> COMMENT), removed whitespace

This is an automated email from the ASF dual-hosted git repository.

mseidel pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 08511ee  Fixed typo (COMMEND -> COMMENT), removed whitespace
08511ee is described below

commit 08511ee295297184f42bd9cc8c54f2819191e6e0
Author: mseidel <ms...@apache.org>
AuthorDate: Sun Aug 22 02:23:46 2021 +0200

    Fixed typo (COMMEND -> COMMENT), removed whitespace
---
 main/l10ntools/inc/tokens.h    | 50 +++++++++++++++++++++---------------------
 main/l10ntools/source/cfglex.l | 29 ++++++++++++------------
 main/l10ntools/source/srclex.l | 37 ++++++++++++++++---------------
 main/l10ntools/source/xrmlex.l | 25 +++++++++++----------
 4 files changed, 71 insertions(+), 70 deletions(-)

diff --git a/main/l10ntools/inc/tokens.h b/main/l10ntools/inc/tokens.h
index 059c8c8..7f72fb5 100644
--- a/main/l10ntools/inc/tokens.h
+++ b/main/l10ntools/inc/tokens.h
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,16 +7,16 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
 
@@ -29,8 +29,8 @@
 /* Tokens for parsing src files												*/
 /*------------------------------------------------------                    */
 /*------------------------------------------------------                    */
-#define IGNOREDTOKENS		400	        /* #include | #pragma | //... | ... */
-#define COMMEND				401			/*...								*/
+#define IGNOREDTOKENS		400			/* #include | #pragma | //... | ... */
+#define COMMENT				401			/*...								*/
 #define DEFINEDRES			402			/* Text = { 	                    */
 #define ANYTOKEN			404			/* XYZ                              */
 #define UNKNOWNTOKEN		405			/* XYZ[ \t]$                        */
@@ -41,30 +41,30 @@
 #define FILTER_LEVEL		500
 /* following tokens will be executed                                        */
 /*------------------------------------------------------                    */
-#define CONDITION			501 		/* #if... | #endif ... | ...        */
-#define EMPTYLINE			502 		/*                                  */
-#define	RESSOURCE			503			/* Menu MID_TEST                    */
-#define	RESSOURCEEXPR		504			/* Menu ( MID_TEST + .. )           */
-#define SMALRESSOURCE   	505 		/* PageItem {                       */
-#define TEXTLINE			506 		/* TEXT = "hhh"                     */
+#define CONDITION			501			/* #if... | #endif ... | ...        */
+#define EMPTYLINE			502			/*                                  */
+#define RESSOURCE			503			/* Menu MID_TEST                    */
+#define RESSOURCEEXPR		504			/* Menu ( MID_TEST + .. )           */
+#define SMALRESSOURCE		505			/* PageItem {                       */
+#define TEXTLINE			506			/* TEXT = "hhh"                     */
 #define LONGTEXTLINE		507			/* TEXT = "hhh" TEST "HHH" ...      */
 #define TEXT				508			/* "Something like this"            */
 #define LEVELUP				509			/* {                                */
 #define LEVELDOWN			510			/* };                               */
 #define APPFONTMAPPING		511			/* MAP_APPFONT(10,10)               */
 #define ASSIGNMENT			512			/* Somathing = Anything             */
-#define LISTASSIGNMENT		513 		/* ...List [xyz]=...                */
-#define LISTTEXT			514 		/* < "Text" ... >                   */
+#define LISTASSIGNMENT		513			/* ...List [xyz]=...                */
+#define LISTTEXT			514			/* < "Text" ... >                   */
 #define RSCDEFINE			515			/* #define MY_TEXT                  */
 #define RSCDEFINELEND		516			/*                                  */
-#define	NEWTEXTINRES		517			/* ### Achtung : Ne... 				*/
-#define	UIENTRIES			518			/* UIEntries = {					*/
+#define NEWTEXTINRES		517			/* ### Achtung : Ne... 				*/
+#define UIENTRIES			518			/* UIEntries = {					*/
 #define PRAGMA				519			/* #pragma ...						*/
-#define _LISTTEXT			521 		/* { "Text" ... }                   */
-#define TEXTREFID			522 		/* Text = 12345                     */
+#define _LISTTEXT			521			/* { "Text" ... }                   */
+#define TEXTREFID			522			/* Text = 12345                     */
 #define LISTRESID			523			/* < 12345; ... >                   */
 #define _LISTRESID			523			/* { 12345; ... }                   */
-#define NORMDEFINE          524         /* #define ...                      */
+#define NORMDEFINE			524			/* #define ...                      */
 /*------------------------------------------------------					*/
 /*------------------------------------------------------                    */
 /* Tokens for parsing cfg files												*/
@@ -94,12 +94,12 @@
 #define XRM_SECTION_START			503
 #define XRM_SECTION_END				504
 #define XRM_PARAGRAPH_START			505
-#define XRM_PARAGRAPH_END  			506
-#define XRM_TEXT_START  			507
-#define XRM_TEXT_END	  			508
-#define XRM_LIST_START  			509
-#define XRM_LIST_END	  			510
+#define XRM_PARAGRAPH_END			506
+#define XRM_TEXT_START				507
+#define XRM_TEXT_END				508
+#define XRM_LIST_START				509
+#define XRM_LIST_END				510
 #define XML_TEXTCHAR				600
 
- 
+
 #endif
diff --git a/main/l10ntools/source/cfglex.l b/main/l10ntools/source/cfglex.l
index 1cbbc1d..b9002cc 100644
--- a/main/l10ntools/source/cfglex.l
+++ b/main/l10ntools/source/cfglex.l
@@ -1,6 +1,6 @@
 %{
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -8,16 +8,16 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 /*
  * lexer for parsing cfg source files
@@ -106,8 +106,8 @@ int bText=0;
 	pChar[1] = 0x00;
 	pChar[0] = c3;
 
-	WorkOnTokenSet( COMMEND, yytext );
-	WorkOnTokenSet( COMMEND, pChar );
+	WorkOnTokenSet( COMMENT, yytext );
+	WorkOnTokenSet( COMMENT, pChar );
 
 	for(;;) {
 		if ( c3 == EOF )
@@ -118,7 +118,7 @@ int bText=0;
 		c2 = c3;
 		c3 = input();
 		pChar[0] = c3;
-		WorkOnTokenSet( COMMEND, pChar );
+		WorkOnTokenSet( COMMENT, pChar );
 	}
 }
 
@@ -130,7 +130,7 @@ int bText=0;
 \<[^\>\!]*\> {
 	bText = 0;
 	if ( yytext[ 1 ] == '!' && yytext[ 2 ] == '-' && yytext[ 3 ] == '-' )
-		WorkOnTokenSet( COMMEND, yytext );
+		WorkOnTokenSet( COMMENT, yytext );
 	else
 		WorkOnTokenSet( CFG_UNKNOWNTAG, yytext );
 }
@@ -190,14 +190,14 @@ main( int argc, char* argv[])
 
 	pOutput = GetOutputFile( argc, argv );
 
-    if ( !pOutput ) {
+	if ( !pOutput ) {
 		fprintf( stdout, "Syntax: CFGEX[-p Prj][-r PrjRoot]-i FileIn [-o FileOut][-m DataBase][-e][-b][-u][-f][-d DoneFile][-g[:dtd] ][-L l1,l2,...]\n" );
 		fprintf( stdout, " Prj:      Project\n" );
 		fprintf( stdout, " PrjRoot:  Path to project root (..\\.. etc.)\n" );
 		fprintf( stdout, " FileIn:   Source files (*.src)\n" );
 		fprintf( stdout, " FileOut:  Destination file (*.*)\n" );
 		fprintf( stdout, " DataBase: Mergedata (*.sdf)\n" );
-        fprintf( stdout, " -e: Disable writing errorlog\n" );
+		fprintf( stdout, " -e: Disable writing errorlog\n" );
 		fprintf( stdout, " -b: Break when Token \"HelpText\" found in source\n" );
 		fprintf( stdout, " -u: [english] and [german] are allowed, Id is Taken from DataBase \n" );
 		fprintf( stdout, " -f: force extraction and merge even if only one language is existent\n" );
@@ -216,22 +216,21 @@ main( int argc, char* argv[])
 	if ( !pFile )
 		return 1;
 
-   	yyin = pFile;
+	yyin = pFile;
 
 	/* create global instance of class CfgExport */
 	//InitCfgExport( pOutput );
 
 	/* start parser */
-   	yylex();
+	yylex();
 
 	/* get error info. and end export */
 	nRetValue = GetError();
 	EndCfgExport();
 
-    
-    removeTempFile();
+
+	removeTempFile();
 /* return error level */
 	return nRetValue;
 }
 
-
diff --git a/main/l10ntools/source/srclex.l b/main/l10ntools/source/srclex.l
index f47f138..8f388ce 100644
--- a/main/l10ntools/source/srclex.l
+++ b/main/l10ntools/source/srclex.l
@@ -1,7 +1,7 @@
 
 %{
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -9,16 +9,16 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 /*
  * lexer for parsing ressource source files (*.src)
@@ -98,8 +98,8 @@ void YYWarning();
 	pChar[1] = 0x00;
 	pChar[0] = c2;
 
-	WorkOnTokenSet( COMMEND, yytext );
-	WorkOnTokenSet( COMMEND, pChar );
+	WorkOnTokenSet( COMMENT, yytext );
+	WorkOnTokenSet( COMMENT, pChar );
 	for(;;) {
 		if ( c2 == EOF )
 			break;
@@ -108,7 +108,7 @@ void YYWarning();
 		c1 = c2;
 		c2 = input();
 		pChar[0] = c2;
-		WorkOnTokenSet( COMMEND, pChar );
+		WorkOnTokenSet( COMMENT, pChar );
 	}
 }
 
@@ -172,8 +172,8 @@ void YYWarning();
 	WorkOnTokenSet( TEXTREFID, yytext );
 }
 
-[a-zA-Z0-9_]+[ \t]*"="[\t ]*([ \t]*"//".*\n)*.*	| 
-[a-zA-Z0-9_]+[ \t]*"=".*	{ 
+[a-zA-Z0-9_]+[ \t]*"="[\t ]*([ \t]*"//".*\n)*.*	|
+[a-zA-Z0-9_]+[ \t]*"=".*	{
 /* ASSIGNMENT  Typ = ...  */
  WorkOnTokenSet( ASSIGNMENT, yytext );
 }
@@ -244,7 +244,7 @@ int	yywrap(void)
 		return 0;
 	}
 
-   /* end of input reached */
+	/* end of input reached */
 	return 1;
 }
 
@@ -277,10 +277,10 @@ main( int argc, char* argv[])
 	int nRetValue = 0;
 	char *pOutput;
 	FILE *pFile;
-    
+
 	pOutput = GetOutputFile( argc, argv );
 
-    if ( !pOutput ) {
+	if ( !pOutput ) {
 		fprintf( stdout, "Syntax:TRANSEX[-p Prj][-r PrjRoot]-i FileIn...[-o FileOut][-m DataBase][-e][-b][-u][-L l1,l2,...]\n" );
 		fprintf( stdout, " Prj:      Project\n" );
 		fprintf( stdout, " PrjRoot:  Path to project root (..\\.. etc.)\n" );
@@ -288,7 +288,7 @@ main( int argc, char* argv[])
 		fprintf( stdout, " FileOut:  Destination file (*.*)\n" );
 		fprintf( stdout, " DataBase: Mergedata (*.sdf)\n" );
 		fprintf( stdout, " -QQ: quiet output\n" );
-        fprintf( stdout, " -e: Disable writing errorlog\n" );
+		fprintf( stdout, " -e: Disable writing errorlog\n" );
 		fprintf( stdout, " -b: Break when Token \"HelpText\" found in source\n" );
 		fprintf( stdout, " -u: [english] and [german] are allowed, Id is Taken from DataBase \n" );
 		fprintf( stdout, " -NOUTF8: disable UTF8 as language independent encoding\n" );
@@ -299,19 +299,19 @@ main( int argc, char* argv[])
 		fprintf( stdout, "              Restriction to de and es, en-US will be fallback for es\n" );
 		return 1;
 	}
-    
+
 	InitExport( pOutput , getFilename() );
 	pFile = GetNextFile();
 	if ( !pFile )
 		return 1;
-    
-   	yyin = pFile;
+
+	yyin = pFile;
 
 	/* create global instance of class Export */
 
 	/* start parser */
-   	yylex();
-   	Close();
+	yylex();
+	Close();
 
 	/* get error info. and end export */
 	nRetValue = GetError();
@@ -320,3 +320,4 @@ main( int argc, char* argv[])
 	/* return error level */
 	return nRetValue;
 }
+
diff --git a/main/l10ntools/source/xrmlex.l b/main/l10ntools/source/xrmlex.l
index 7d263fe..80f330f 100644
--- a/main/l10ntools/source/xrmlex.l
+++ b/main/l10ntools/source/xrmlex.l
@@ -1,6 +1,6 @@
 %{
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -8,16 +8,16 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 /*
  * lexer for parsing xml-property source files (*.xml)
@@ -38,7 +38,7 @@
 #endif
 
 /* table of possible token ids */
-#include "tokens.h"                          
+#include "tokens.h"
 #include <stdlib.h>
 #include <stdio.h>
 
@@ -130,8 +130,8 @@ int bText=0;
 	pChar[1] = 0x00;
 	pChar[0] = c3;
 
-	WorkOnTokenSet( COMMEND, yytext );
-	WorkOnTokenSet( COMMEND, pChar );
+	WorkOnTokenSet( COMMENT, yytext );
+	WorkOnTokenSet( COMMENT, pChar );
 
 	for(;;) {
 		if ( c3 == EOF )
@@ -142,7 +142,7 @@ int bText=0;
 		c2 = c3;
 		c3 = input();
 		pChar[0] = c3;
-		WorkOnTokenSet( COMMEND, pChar );                          
+		WorkOnTokenSet( COMMENT, pChar );
 	}
 }
 
@@ -223,22 +223,23 @@ main( int argc, char* argv[])
 	pFile = GetXrmFile();
 	InitXrmExport( pOutput , getFilename() );
 
-    if ( !pFile )
+	if ( !pFile )
 		return 1;
 
-   	yyin = pFile;
+	yyin = pFile;
 
 	/* create global instance of class XmlExport */
 	//InitXrmExport( pOutput );
 
 	/* start parser */
-   	yylex();
+	yylex();
 
 	/* get error info. and end export */
 	nRetValue = GetError();
 	EndXrmExport();
 
-    removeTempFile();
+	removeTempFile();
 	/* return error level */
 	return nRetValue;
 }
+