incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1209396 - in /incubator/ooo/trunk: ext_sources/ main/ main/idlc/prj/ main/idlc/source/ main/idlc/source/preproc/ main/odk/pack/copying/ main/odk/util/ main/splitbuild/ main/ucpp/ main/ucpp/prj/
Date Fri, 02 Dec 2011 10:46:38 GMT
Author: jsc
Date: Fri Dec  2 10:46:37 2011
New Revision: 1209396

URL: http://svn.apache.org/viewvc?rev=1209396&view=rev
Log:
118568: replace license incompatible lcc with ucpp

Added:
    incubator/ooo/trunk/ext_sources/0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz   (with
props)
    incubator/ooo/trunk/main/ucpp/
    incubator/ooo/trunk/main/ucpp/makefile.mk
    incubator/ooo/trunk/main/ucpp/prj/
    incubator/ooo/trunk/main/ucpp/prj/build.lst
    incubator/ooo/trunk/main/ucpp/prj/d.lst
    incubator/ooo/trunk/main/ucpp/ucpp.patch
Removed:
    incubator/ooo/trunk/main/idlc/source/preproc/
Modified:
    incubator/ooo/trunk/main/idlc/prj/build.lst
    incubator/ooo/trunk/main/idlc/prj/d.lst
    incubator/ooo/trunk/main/idlc/source/idlccompile.cxx
    incubator/ooo/trunk/main/idlc/source/options.cxx
    incubator/ooo/trunk/main/odk/pack/copying/makefile.mk
    incubator/ooo/trunk/main/odk/util/check.pl
    incubator/ooo/trunk/main/ooo.lst
    incubator/ooo/trunk/main/splitbuild/uno.lst

Added: incubator/ooo/trunk/ext_sources/0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/ext_sources/0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz?rev=1209396&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ooo/trunk/ext_sources/0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/ooo/trunk/ext_sources/0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: incubator/ooo/trunk/main/idlc/prj/build.lst
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/idlc/prj/build.lst?rev=1209396&r1=1209395&r2=1209396&view=diff
==============================================================================
--- incubator/ooo/trunk/main/idlc/prj/build.lst (original)
+++ incubator/ooo/trunk/main/idlc/prj/build.lst Fri Dec  2 10:46:37 2011
@@ -1,5 +1,4 @@
-ic	idlc	:	registry NULL
+ic	idlc	:	ucpp registry NULL
 ic	idlc					usr1	-	all	ic_mkout NULL
 ic	idlc\inc				nmake	-	all	ic_inc NULL
-ic	idlc\source\preproc		nmake	-	all	ic_preproc ic_inc NULL
 ic	idlc\source				nmake	-	all ic_source ic_inc NULL

Modified: incubator/ooo/trunk/main/idlc/prj/d.lst
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/idlc/prj/d.lst?rev=1209396&r1=1209395&r2=1209396&view=diff
==============================================================================
--- incubator/ooo/trunk/main/idlc/prj/d.lst (original)
+++ incubator/ooo/trunk/main/idlc/prj/d.lst Fri Dec  2 10:46:37 2011
@@ -1,7 +1,4 @@
 ..\%__SRC%\bin\idlc.exe %_DEST%\bin%_EXT%\idlc.exe
 ..\%__SRC%\bin\idlc.pdb %_DEST%\bin%_EXT%\idlc.pdb
-..\%__SRC%\bin\idlcpp.exe %_DEST%\bin%_EXT%\idlcpp.exe
-..\%__SRC%\bin\idlcpp.pdb %_DEST%\bin%_EXT%\idlcpp.pdb
 
 ..\%__SRC%\bin\idlc %_DEST%\bin%_EXT%\idlc
-..\%__SRC%\bin\idlcpp %_DEST%\bin%_EXT%\idlcpp

Modified: incubator/ooo/trunk/main/idlc/source/idlccompile.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/idlc/source/idlccompile.cxx?rev=1209396&r1=1209395&r2=1209396&view=diff
==============================================================================
--- incubator/ooo/trunk/main/idlc/source/idlccompile.cxx (original)
+++ incubator/ooo/trunk/main/idlc/source/idlccompile.cxx Fri Dec  2 10:46:37 2011
@@ -35,7 +35,7 @@
 #include <io.h>
 #endif
 
-#ifdef	SAL_UNX
+#ifdef  SAL_UNX
 #include <unistd.h>
 #if defined(MACOSX) || defined(FREEBSD) || defined(NETBSD)
 #include <sys/wait.h>
@@ -125,23 +125,23 @@ OString convertToFileUrl(const OString& 
 
 OString makeTempName(const OString& prefix)
 {
-	OUString uTmpPath;
-	OString tmpPath;
+    OUString uTmpPath;
+    OString tmpPath;
 
-	if ( osl_getEnvironment(TMP.pData, &uTmpPath.pData) != osl_Process_E_None )
-	{
-		if ( osl_getEnvironment(TEMP.pData, &uTmpPath.pData) != osl_Process_E_None )
-		{
+    if ( osl_getEnvironment(TMP.pData, &uTmpPath.pData) != osl_Process_E_None )
+    {
+        if ( osl_getEnvironment(TEMP.pData, &uTmpPath.pData) != osl_Process_E_None )
+        {
 #if defined(SAL_W32)
-			tmpPath = OString("c:\\temp");
+            tmpPath = OString("c:\\temp");
 #else
-			tmpPath = OString("/tmp");
+            tmpPath = OString("/tmp");
 #endif
-		}
-	}
+        }
+    }
 
-	if ( uTmpPath.getLength() )
-		tmpPath = OUStringToOString(uTmpPath, RTL_TEXTENCODING_UTF8);
+    if ( uTmpPath.getLength() )
+        tmpPath = OUStringToOString(uTmpPath, RTL_TEXTENCODING_UTF8);
 
 #if defined(SAL_W32) || defined(SAL_UNX) || defined(SAL_OS2)
 
@@ -159,43 +159,41 @@ OString makeTempName(const OString& pref
     strncat(tmpFilePattern, "XXXXXX", sizeof(tmpFilePattern)-1-strlen(tmpFilePattern));
 
 #ifdef SAL_UNX
-	int nDescriptor = mkstemp(tmpFilePattern);
-	if( -1 == nDescriptor )
-	{
-	    fprintf( stderr,"idlc: couldn't create temporary file\n" );
-	    exit( 1 );
-	}
-	// the file shall later be reopened by stdio functions
-	close( nDescriptor );
+    int nDescriptor = mkstemp(tmpFilePattern);
+    if( -1 == nDescriptor )
+    {
+        fprintf( stderr,"idlc: couldn't create temporary file %s\n", tmpFilePattern );
+        exit( 1 );
+    }
+    // the file shall later be reopened by stdio functions
+    close( nDescriptor );
 #else
-	(void) mktemp(tmpFilePattern);
+    (void) mktemp(tmpFilePattern);
 #endif
 #endif
 
-	return OString(tmpFilePattern);
+    return OString(tmpFilePattern);
 }
 
 sal_Bool copyFile(const OString* source, const OString& target)
 {
     sal_Bool bRet = sal_True;
 
-	FILE* pSource = source == 0 ? stdin : fopen(source->getStr(), "rb");
-
-	if ( !pSource )
+    FILE* pSource = source == 0 ? stdin : fopen(source->getStr(), "rb");
+    if ( !pSource )
         return sal_False;
 
-	FILE* pTarget = fopen(target.getStr(), "wb");
-
-	if ( !pTarget )
+    FILE* pTarget = fopen(target.getStr(), "wb");
+    if ( !pTarget )
     {
         fclose(pSource);
         return sal_False;
     }
-
+    
     size_t totalSize = 512;
     size_t readSize  = 0;
     size_t writeSize = 0;
-	char   pBuffer[513];
+    char   pBuffer[513];
 
     while ( !feof(pSource) )
     {
@@ -215,7 +213,7 @@ sal_Bool copyFile(const OString* source,
     if (source != 0) {
         fclose(pSource);
     }
-	if ( fflush(pTarget) )
+    if ( fflush(pTarget) )
         bRet = sal_False;
     fclose(pTarget);
 
@@ -224,9 +222,9 @@ sal_Bool copyFile(const OString* source,
 
 sal_Int32 compileFile(const OString * pathname)
 {
-	// preprocess input file
-	OString tmpFile = makeTempName(OString("idli_"));
-	OString preprocFile = makeTempName(OString("idlf_"));
+    // preprocess input file
+    OString tmpFile = makeTempName(OString("idli_"));
+    OString preprocFile = makeTempName(OString("idlf_"));
 
     OString fileName;
     if (pathname == 0) {
@@ -235,85 +233,81 @@ sal_Int32 compileFile(const OString * pa
         fileName = *pathname;
     }
 
-	if ( !copyFile(pathname, tmpFile) )
+    if ( !copyFile(pathname, tmpFile) )
     {
-	  	fprintf(stderr, "%s: could not copy %s%s to %s\n",
+        fprintf(stderr, "%s: could not copy %s%s to %s\n",
                 idlc()->getOptions()->getProgramName().getStr(),
                 pathname == 0 ? "" : "file ", fileName.getStr(),
                 tmpFile.getStr());
-	  	exit(99);
+        exit(99);
     }
 
-	idlc()->setFileName(fileName);
-	idlc()->setMainFileName(fileName);
-	idlc()->setRealFileName(tmpFile);
-
-	OStringBuffer cppArgs(512);
-	cppArgs.append("-DIDL -Xi -Xc -+ -I.");
-	Options* pOptions = idlc()->getOptions();
+    idlc()->setFileName(fileName);
+    idlc()->setMainFileName(fileName);
+    idlc()->setRealFileName(tmpFile);
+
+    ::std::vector< ::rtl::OUString > lCppArgs;
+    lCppArgs.push_back(OUString(RTL_CONSTASCII_USTRINGPARAM("-DIDL")));
+    lCppArgs.push_back(OUString(RTL_CONSTASCII_USTRINGPARAM("-C")));
+    lCppArgs.push_back(OUString(RTL_CONSTASCII_USTRINGPARAM("-zI")));
+    lCppArgs.push_back(OUString(RTL_CONSTASCII_USTRINGPARAM("-I.")));
+    
+    OStringBuffer cppArgs(256);
+    Options* pOptions = idlc()->getOptions();
 
-	OString filePath;
-	sal_Int32 index = fileName.lastIndexOf(SEPARATOR);
+    OString filePath;
+    sal_Int32 index = fileName.lastIndexOf(SEPARATOR);
 
-	if ( index > 0)
-	{
-		filePath = fileName.copy(0, index);
+    if ( index > 0)
+    {
+        filePath = fileName.copy(0, index);
 
-		if ( filePath.getLength() )
-		{
-			cppArgs.append(" -I\"");
-			cppArgs.append(filePath);
-			cppArgs.append("\"");
+        if ( filePath.getLength() )
+        {
+            cppArgs.append("-I");
+            cppArgs.append(filePath);
+            lCppArgs.push_back(OStringToOUString(cppArgs.makeStringAndClear().replace('\\',
'/'), RTL_TEXTENCODING_UTF8));
 		}
 	}
 
 	if ( pOptions->isValid("-D") )
 	{
-		cppArgs.append(" ");
-		cppArgs.append(pOptions->getOption("-D"));
+        OString dOpt = pOptions->getOption("-D");
+        OString token;
+        sal_Int32 nIndex = 0;
+        do
+        {
+            token = dOpt.getToken( 0, ' ', nIndex );
+            if (token.getLength())
+            {
+                lCppArgs.push_back(OStringToOUString(token, RTL_TEXTENCODING_UTF8));
+            }
+        } while( nIndex != -1 );        
 	}
+    
 	if ( pOptions->isValid("-I") )
 	{
-		cppArgs.append(" ");
-		cppArgs.append(pOptions->getOption("-I"));
+        OString incOpt = pOptions->getOption("-I");
+        OString token;
+        sal_Int32 nIndex = 0;
+        do
+        {
+            token = incOpt.getToken( 0, ' ', nIndex );
+            if (token.getLength())
+            {
+                lCppArgs.push_back(OStringToOUString(token, RTL_TEXTENCODING_UTF8));
+            }
+        } while( nIndex != -1 );
 	}
 
-	cppArgs.append(" \"");
-	cppArgs.append(tmpFile);
-	cppArgs.append("\" \"");
+    lCppArgs.push_back(OUString(RTL_CONSTASCII_USTRINGPARAM("-o")));
+    
 	cppArgs.append(preprocFile);
-	cppArgs.append("\"");
-
-	OString cmdFileName = makeTempName(OString("idlc_"));
-	FILE* pCmdFile = fopen(cmdFileName, "w");
-
-	if ( !pCmdFile )
-	{
-	  	fprintf(stderr, "%s: couldn't open temporary file for preprocessor commands: %s\n",
-			idlc()->getOptions()->getProgramName().getStr(), cmdFileName.getStr());
-	  	exit(99);
-	}
-#ifdef SAL_OS2_00
-      char* tok = strtok( (char*)cppArgs.getStr(), " \t\n\r");
-      while( tok) {
-         if (tok[strlen(tok)-1] == '\"') 
-            tok[strlen(tok)-1] = '\0';
-         if (*tok == '\"') 
-            memcpy( tok, tok+1, strlen(tok));
-         if (strlen(tok)>0) {
-            fputs(tok, pCmdFile);
-            fputc('\n', pCmdFile);
-         }
-         tok = strtok( NULL, " \t\n\r");
-      }
-#else
-	fprintf(pCmdFile, "%s", cppArgs.getStr());
-#endif
-	fclose(pCmdFile);
-
-	OUString cmdArg(RTL_CONSTASCII_USTRINGPARAM("@"));
-	cmdArg += OStringToOUString(cmdFileName, RTL_TEXTENCODING_UTF8);
+    lCppArgs.push_back(OStringToOUString(cppArgs.makeStringAndClear(), RTL_TEXTENCODING_UTF8));
 
+    cppArgs.append(tmpFile);
+    lCppArgs.push_back(OStringToOUString(cppArgs.makeStringAndClear(), RTL_TEXTENCODING_UTF8));
+ 
 	OUString cpp;
 	OUString startDir;
 	if (osl_getExecutableFile(&cpp.pData) != osl_Process_E_None) {
@@ -324,15 +318,27 @@ sal_Int32 compileFile(const OString * pa
  	cpp = cpp.copy(0, idx);
     
 #if defined(SAL_W32) || defined(SAL_OS2)
- 	cpp += OUString( RTL_CONSTASCII_USTRINGPARAM("idlcpp.exe"));
+ 	cpp += OUString( RTL_CONSTASCII_USTRINGPARAM("ucpp.exe"));
 #else
-	cpp += OUString( RTL_CONSTASCII_USTRINGPARAM("idlcpp"));
+	cpp += OUString( RTL_CONSTASCII_USTRINGPARAM("ucpp"));
 #endif
 
 	oslProcess		hProcess = NULL;
 	oslProcessError	procError = osl_Process_E_None;
 
-	procError = osl_executeProcess(cpp.pData, &cmdArg.pData, 1, osl_Process_WAIT,
+    const int nCmdArgs = lCppArgs.size();
+    rtl_uString** pCmdArgs = 0;
+    pCmdArgs = (rtl_uString**)rtl_allocateZeroMemory(nCmdArgs * sizeof(rtl_uString*));
+
+    ::std::vector< ::rtl::OUString >::iterator iter = lCppArgs.begin();
+    ::std::vector< ::rtl::OUString >::iterator end = lCppArgs.end();
+    int i = 0;
+	while ( iter != end ) {
+        pCmdArgs[i++] = (*iter).pData;
+        ++iter;
+    }
+    
+	procError = osl_executeProcess(cpp.pData, pCmdArgs, nCmdArgs, osl_Process_WAIT,
 								   0, startDir.pData, 0, 0, &hProcess);
 
 	oslProcessInfo hInfo;
@@ -352,13 +358,15 @@ sal_Int32 compileFile(const OString * pa
                     pOptions->getProgramName().getStr(),
                     pathname == 0 ? "" : "file ", fileName.getStr());
 
-		unlink(tmpFile.getStr());
-		unlink(preprocFile.getStr());
-		unlink(cmdFileName.getStr());
+		// unlink(tmpFile.getStr());
+		// unlink(preprocFile.getStr());
+		// unlink(cmdFileName.getStr());
 		osl_freeProcessHandle(hProcess);
+        rtl_freeMemory(pCmdArgs);
 		exit(hInfo.Code ? hInfo.Code : 99);
 	}
 	osl_freeProcessHandle(hProcess);
+    rtl_freeMemory(pCmdArgs);
 
 	if (unlink(tmpFile.getStr()) != 0)
 	{
@@ -367,14 +375,6 @@ sal_Int32 compileFile(const OString * pa
 		exit(99);
 	}
 
-	if (unlink(cmdFileName.getStr()) != 0)
-	{
-		fprintf(stderr, "%s: Could not remove unocpp command file %s\n",
-			   	pOptions->getProgramName().getStr(), cmdFileName.getStr());
-
-		exit(99);
-	}
-
 	if ( pOptions->isValid("-E") )
 	{
 		if (unlink(preprocFile) != 0)
@@ -405,7 +405,7 @@ sal_Int32 compileFile(const OString * pa
 	fclose(yyin);
 	if (unlink(preprocFile.getStr()) != 0)
 	{
-		fprintf(stderr, "%s: Could not remove parser input file %s\n",
+        fprintf(stderr, "%s: Could not remove parser input file %s\n",
 			    pOptions->getProgramName().getStr(), preprocFile.getStr());
 		exit(99);
 	}

Modified: incubator/ooo/trunk/main/idlc/source/options.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/idlc/source/options.cxx?rev=1209396&r1=1209395&r2=1209396&view=diff
==============================================================================
--- incubator/ooo/trunk/main/idlc/source/options.cxx (original)
+++ incubator/ooo/trunk/main/idlc/source/options.cxx Fri Dec  2 10:46:37 2011
@@ -43,7 +43,7 @@ using rtl::OStringBuffer;
 #endif
 
 Options::Options(char const * progname)
-  : m_program(progname), m_stdin(false), m_verbose(false), m_quiet(false)
+    : m_program(progname), m_stdin(false), m_verbose(false), m_quiet(false)
 {
 }	
 
@@ -54,54 +54,54 @@ Options::~Options()
 // static
 bool Options::checkArgument (std::vector< std::string > & rArgs, char const * arg,
size_t len)
 {
-  bool result = ((arg != 0) && (len > 0));
-  OSL_PRECOND(result, "idlc::Options::checkArgument(): invalid arguments");
-  if (result)
-  {
-    switch(arg[0])
+    bool result = ((arg != 0) && (len > 0));
+    OSL_PRECOND(result, "idlc::Options::checkArgument(): invalid arguments");
+    if (result)
     {
-    case '@':
-      if ((result = (len > 1)) == true)
-      {
-        // "@<cmdfile>"
-        result = Options::checkCommandFile (rArgs, &(arg[1]));
-      }
-      break;
-    case '-':
-      if ((result = (len > 1)) == true)
-      {
-        // "-<option>"
-        switch (arg[1])
+        switch(arg[0])
         {
-        case 'O':
-        case 'I':
-        case 'D':
-          {
-            // "-<option>[<param>]
-            std::string option(&(arg[0]), 2);
-            rArgs.push_back(option);
-            if (len > 2)
-            {
-              // "-<option><param>"
-              std::string param(&(arg[2]), len - 2);
-              rArgs.push_back(param);
+        case '@':
+            if ((result = (len > 1)) == true)
+            {
+                // "@<cmdfile>"
+                result = Options::checkCommandFile (rArgs, &(arg[1]));
+            }
+            break;
+        case '-':
+            if ((result = (len > 1)) == true)
+            {
+                // "-<option>"
+                switch (arg[1])
+                {
+                case 'O':
+                case 'I':
+                case 'D':
+                {
+                    // "-<option>[<param>]
+                    std::string option(&(arg[0]), 2);
+                    rArgs.push_back(option);
+                    if (len > 2)
+                    {
+                        // "-<option><param>"
+                        std::string param(&(arg[2]), len - 2);
+                        rArgs.push_back(param);
+                    }
+                    break;
+                }
+                default:
+                    // "-<option>" ([long] option, w/o param)
+                    rArgs.push_back(std::string(arg, len));
+                    break;
+                }
             }
             break;
-          }
         default:
-          // "-<option>" ([long] option, w/o param)
-          rArgs.push_back(std::string(arg, len));
-          break;
-        }
-      }
-      break;
-    default:
-      // "<param>"
-      rArgs.push_back(std::string(arg, len));
-      break;
+            // "<param>"
+            rArgs.push_back(std::string(arg, len));
+            break;
+        }
     }
-  }
-  return (result);
+    return (result);
 }
 
 // static
@@ -113,10 +113,10 @@ bool Options::checkCommandFile (std::vec
         fprintf(stderr, "ERROR: can't open command file \"%s\"\n", filename);
         return (false);
     }
-
+    
     std::string buffer;
     buffer.reserve(256);
-
+    
     bool quoted = false;
     int c = EOF;
     while ((c = fgetc(fp)) != EOF)
@@ -124,30 +124,30 @@ bool Options::checkCommandFile (std::vec
         switch(c)
         {
         case '\"':
-          quoted = !quoted;
-          break;
+            quoted = !quoted;
+            break;
         case ' ':
         case '\t':
         case '\r':
         case '\n':
-          if (!quoted)
-          {
-              if (!buffer.empty())
-              {
-                  // append current argument.
-                  if (!Options::checkArgument(rArgs, buffer.c_str(), buffer.size()))
-                  {
-                      (void) fclose(fp);
-                      return (false);
-                  }
-                  buffer.clear();
-              }
-              break;
-          }
+            if (!quoted)
+            {
+                if (!buffer.empty())
+                {
+                    // append current argument.
+                    if (!Options::checkArgument(rArgs, buffer.c_str(), buffer.size()))
+                    {
+                        (void) fclose(fp);
+                        return (false);
+                    }
+                    buffer.clear();
+                }
+                break;
+            }
         default:
-          // quoted white-space fall through
-          buffer.push_back(sal::static_int_cast<char>(c));
-          break;
+            // quoted white-space fall through
+            buffer.push_back(sal::static_int_cast<char>(c));
+            break;
         }
     }
     if (!buffer.empty())
@@ -165,175 +165,174 @@ bool Options::checkCommandFile (std::vec
 
 bool Options::badOption(char const * reason, std::string const & rArg) throw(IllegalArgument)
 {
-  OStringBuffer message;
-  if (reason != 0)
-  {
-    message.append(reason); message.append(" option '"); message.append(rArg.c_str()); message.append("'");
-    throw IllegalArgument(message.makeStringAndClear());
-  }
-  return false;
+    OStringBuffer message;
+    if (reason != 0)
+    {
+        message.append(reason); message.append(" option '"); message.append(rArg.c_str());
message.append("'");
+        throw IllegalArgument(message.makeStringAndClear());
+    }
+    return false;
 }
 
 bool Options::setOption(char const * option, std::string const & rArg)
 {
-  bool result = (0 == strcmp(option, rArg.c_str()));
-  if (result)
-    m_options[rArg.c_str()] = OString(rArg.c_str(), rArg.size());
-  return (result);
+    bool result = (0 == strcmp(option, rArg.c_str()));
+    if (result)
+        m_options[rArg.c_str()] = OString(rArg.c_str(), rArg.size());
+    return (result);
 }
 
 bool Options::initOptions(std::vector< std::string > & rArgs) throw(IllegalArgument)
 {
-  std::vector< std::string >::const_iterator first = rArgs.begin(), last = rArgs.end();
-  for (; first != last; ++first)
-  {
-    if ((*first)[0] != '-')
+    std::vector< std::string >::const_iterator first = rArgs.begin(), last = rArgs.end();
+    for (; first != last; ++first)
     {
-      OString filename((*first).c_str(), (*first).size());
-      OString tmp(filename.toAsciiLowerCase());
-      if (tmp.lastIndexOf(".idl") != (tmp.getLength() - 4))
-      {
-        throw IllegalArgument("'" + filename + "' is not a valid input file, only '*.idl'
files will be accepted");
-      }
-      m_inputFiles.push_back(filename);
-      continue;
-    }
-
-    std::string const option(*first);
-    switch((*first)[1])
-    {
-    case 'O':
-      {
-        if (!((++first != last) && ((*first)[0] != '-')))
-        {
-          return badOption("invalid", option);
-        }
-        OString param((*first).c_str(), (*first).size());
-        m_options["-O"] = param;
-        break;
-      }
-    case 'I':
-      {
-        if (!((++first != last) && ((*first)[0] != '-')))
-        {
-          return badOption("invalid", option);
-        }
-        OString param((*first).c_str(), (*first).size());
-        {
-          // quote param token(s).
-          OStringBuffer buffer;
-          sal_Int32 k = 0;
-          do
-          {
-            OStringBuffer token; token.append("-I\""); token.append(param.getToken(0, ';',
k)); token.append("\"");
-            if (buffer.getLength() > 0)
-              buffer.append(' ');
-            buffer.append(token);
-          } while (k != -1);
-          param = buffer.makeStringAndClear();
-        }
-        if (m_options.count("-I") > 0)
-        {
-          // append param.
-          OStringBuffer buffer(m_options["-I"]);
-          buffer.append(' '); buffer.append(param);
-          param = buffer.makeStringAndClear();
-        }
-        m_options["-I"] = param;
-        break;
-      }
-    case 'D':
-      {
-        if (!((++first != last) && ((*first)[0] != '-')))
-        {
-          return badOption("invalid", option);
-        }
-        OString param("-D"); param += OString((*first).c_str(), (*first).size());
-        if (m_options.count("-D") > 0)
-        {
-          OStringBuffer buffer(m_options["-D"]);
-          buffer.append(' '); buffer.append(param);
-          param = buffer.makeStringAndClear();
-        }
-        m_options["-D"] = param;
-        break;
-      }
-    case 'C':
-      {
-        if (!setOption("-C", option))
-        {
-          return badOption("invalid", option);
-        }
-        break;
-      }
-    case 'c':
-      {
-        if (!setOption("-cid", option))
-        {
-          return badOption("invalid", option);
-        }
-        break;
-      }
-    case 'q':
-      {
-        if (!setOption("-quiet", option))
-        {
-          return badOption("invalid", option);
-        }
-        m_quiet = true;
-        break;
-      }
-    case 'v':
-      {
-        if (!setOption("-verbose", option))
-        {
-          return badOption("invalid", option);
-        }
-        m_verbose = true;
-        break;
-      }
-    case 'w':
-      {
-        if (!(setOption("-w", option) || setOption("-we", option)))
-        {
-          return badOption("invalid", option);
-        }
-        break;
-      }
-    case 'h':
-    case '?':
-      {
-        if (!(setOption("-h", option) || setOption("-?", option)))
-        {
-          return badOption("invalid", option);
-        }
-        {
-          (void) fprintf(stdout, "%s", prepareHelp().getStr());
-          return (false);
-        }
-        // break; // Unreachable
-      }
-    case 's':
-      {
-        if (!setOption("-stdin", option))
-        {
-          return badOption("invalid", option);
-        }
-        m_stdin = true;
-        break;
-      }
-    default:
-      return badOption("unknown", option);
+        if ((*first)[0] != '-')
+        {
+            OString filename((*first).c_str(), (*first).size());
+            OString tmp(filename.toAsciiLowerCase());
+            if (tmp.lastIndexOf(".idl") != (tmp.getLength() - 4))
+            {
+                throw IllegalArgument("'" + filename + "' is not a valid input file, only
'*.idl' files will be accepted");
+            }
+            m_inputFiles.push_back(filename);
+            continue;
+        }
+        
+        std::string const option(*first);
+        switch((*first)[1])
+        {
+        case 'O':
+        {
+            if (!((++first != last) && ((*first)[0] != '-')))
+            {
+                return badOption("invalid", option);
+            }
+            OString param((*first).c_str(), (*first).size());
+            m_options["-O"] = param;
+            break;
+        }
+        case 'I':
+        {
+            if (!((++first != last) && ((*first)[0] != '-')))
+            {
+                return badOption("invalid", option);
+            }
+            OString param((*first).c_str(), (*first).size());
+            {
+                // quote param token(s).
+                OStringBuffer buffer;
+                sal_Int32 k = 0;
+                do
+                {
+                    OStringBuffer token; token.append("-I"); token.append(param.getToken(0,
';', k));
+                    if (buffer.getLength() > 0)
+                        buffer.append(' ');
+                    buffer.append(token);
+                } while (k != -1);
+                param = buffer.makeStringAndClear();
+            }
+            if (m_options.count("-I") > 0)
+            {
+                // append param.
+                OStringBuffer buffer(m_options["-I"]);
+                buffer.append(' '); buffer.append(param);
+                param = buffer.makeStringAndClear();
+            }
+            m_options["-I"] = param;
+            break;
+        }
+        case 'D':
+        {
+            if (!((++first != last) && ((*first)[0] != '-')))
+            {
+                return badOption("invalid", option);
+            }
+            OString param("-D"); param += OString((*first).c_str(), (*first).size());
+            if (m_options.count("-D") > 0)
+            {
+                OStringBuffer buffer(m_options["-D"]);
+                buffer.append(' '); buffer.append(param);
+                param = buffer.makeStringAndClear();
+            }
+            m_options["-D"] = param;
+            break;
+        }
+        case 'C':
+        {
+            if (!setOption("-C", option))
+            {
+                return badOption("invalid", option);
+            }
+            break;
+        }
+        case 'c':
+        {
+            if (!setOption("-cid", option))
+            {
+                return badOption("invalid", option);
+            }
+            break;
+        }
+        case 'q':
+        {
+            if (!setOption("-quiet", option))
+            {
+                return badOption("invalid", option);
+            }
+            m_quiet = true;
+            break;
+        }
+        case 'v':
+        {
+            if (!setOption("-verbose", option))
+            {
+                return badOption("invalid", option);
+            }
+            m_verbose = true;
+            break;
+        }
+        case 'w':
+        {
+            if (!(setOption("-w", option) || setOption("-we", option)))
+            {
+                return badOption("invalid", option);
+            }
+            break;
+        }
+        case 'h':
+        case '?':
+        {
+            if (!(setOption("-h", option) || setOption("-?", option)))
+            {
+                return badOption("invalid", option);
+            }
+            {
+                (void) fprintf(stdout, "%s", prepareHelp().getStr());
+                return (false);
+            }
+            // break; // Unreachable
+        }
+        case 's':
+        {
+            if (!setOption("-stdin", option))
+            {
+                return badOption("invalid", option);
+            }
+            m_stdin = true;
+            break;
+        }
+        default:
+            return badOption("unknown", option);
+        }
     }
-  }
-  return (true);
+    return (true);
 }
 
 OString	Options::prepareHelp()
 {
 	OString help("\nusing: ");
-	help += m_program
-        + " [-options] <file_1> ... <file_n> | @<filename> | -stdin\n";
+	help += m_program + " [-options] <file_1> ... <file_n> | @<filename> |
-stdin\n";
 	help += "    <file_n>    = file_n specifies one or more idl files.\n";
 	help += "                  Only files with the extension '.idl' are valid.\n";
 	help += "    @<filename> = filename specifies the name of a command file.\n";

Modified: incubator/ooo/trunk/main/odk/pack/copying/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/odk/pack/copying/makefile.mk?rev=1209396&r1=1209395&r2=1209396&view=diff
==============================================================================
--- incubator/ooo/trunk/main/odk/pack/copying/makefile.mk (original)
+++ incubator/ooo/trunk/main/odk/pack/copying/makefile.mk Fri Dec  2 10:46:37 2011
@@ -50,7 +50,7 @@ IDL_CHAPTER_REFS=idl_chapter_refs.txt
 EXELIST = \
 	$(DESTDIRBIN)/cppumaker$(EXEPOSTFIX) 	\
 	$(DESTDIRBIN)/regcompare$(EXEPOSTFIX) 	\
-	$(DESTDIRBIN)/idlcpp$(EXEPOSTFIX) 	\
+	$(DESTDIRBIN)/ucpp$(EXEPOSTFIX) 	\
 	$(DESTDIRBIN)/idlc$(EXEPOSTFIX) 	\
 	$(DESTDIRBIN)/javamaker$(EXEPOSTFIX) 	\
 	$(DESTDIRBIN)/autodoc$(EXEPOSTFIX) \

Modified: incubator/ooo/trunk/main/odk/util/check.pl
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/odk/util/check.pl?rev=1209396&r1=1209395&r2=1209396&view=diff
==============================================================================
--- incubator/ooo/trunk/main/odk/util/check.pl (original)
+++ incubator/ooo/trunk/main/odk/util/check.pl Fri Dec  2 10:46:37 2011
@@ -43,7 +43,7 @@ if (-d "$StartDir") {
     # check binaries
     print "check binaries: ";
     if (-d "$StartDir/bin") {
-	my @binarylist = ( "idlc","idlcpp","cppumaker","javamaker",
+	my @binarylist = ( "idlc","ucpp","cppumaker","javamaker",
 			   "regcompare","autodoc",
 			   "unoapploader", "uno-skeletonmaker" );
 

Modified: incubator/ooo/trunk/main/ooo.lst
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/ooo.lst?rev=1209396&r1=1209395&r2=1209396&view=diff
==============================================================================
--- incubator/ooo/trunk/main/ooo.lst (original)
+++ incubator/ooo/trunk/main/ooo.lst Fri Dec  2 10:46:37 2011
@@ -57,6 +57,7 @@ cf8a6967f7de535ae257fa411c98eb88-mdds_0.
 220035f111ea045a51e290906025e8b5-libpng-1.5.1.tar.gz
 a2c10c04f396a9ce72894beb18b4e1f9-jpeg-8c.tar.gz
 c735eab2d659a96e5a594c9e8541ad63-zlib-1.2.5.tar.gz
+0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz
 
 # Temporary
 http://hg.services.openoffice.org/binaries/

Modified: incubator/ooo/trunk/main/splitbuild/uno.lst
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/splitbuild/uno.lst?rev=1209396&r1=1209395&r2=1209396&view=diff
==============================================================================
--- incubator/ooo/trunk/main/splitbuild/uno.lst (original)
+++ incubator/ooo/trunk/main/splitbuild/uno.lst Fri Dec  2 10:46:37 2011
@@ -1 +1 @@
-autodoc bridges cli_ure codemaker cosv cppu cppuhelper cpputools idlc io javaunohelper jurt
jvmaccess jvmfwk odk offapi offuh qadevOOo rdbmaker readlicense_oo registry remotebridges
ridljar sal salhelper stoc store testshl2 udkapi udm unodevtools unoil ure xml2cmp
+autodoc bridges cli_ure codemaker cosv cppu cppuhelper cpputools ucpp idlc io javaunohelper
jurt jvmaccess jvmfwk odk offapi offuh qadevOOo rdbmaker readlicense_oo registry remotebridges
ridljar sal salhelper stoc store testshl2 udkapi udm unodevtools unoil ure xml2cmp

Added: incubator/ooo/trunk/main/ucpp/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/ucpp/makefile.mk?rev=1209396&view=auto
==============================================================================
--- incubator/ooo/trunk/main/ucpp/makefile.mk (added)
+++ incubator/ooo/trunk/main/ucpp/makefile.mk Fri Dec  2 10:46:37 2011
@@ -0,0 +1,54 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org.  If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ=.
+
+PRJNAME=ucpp
+TARGET=ucpp
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE :	settings.mk
+
+# --- Files --------------------------------------------------------
+
+TARFILE_NAME=ucpp-1.3.2
+TARFILE_ROOTDIR=ucpp
+TARFILE_MD5=0168229624cfac409e766913506961a8
+PATCH_FILES=ucpp.patch
+
+ADDITIONAL_FILES=makefile.mk
+
+#BUILD_DIR=
+BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS)
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : set_ext.mk
+.INCLUDE : target.mk
+.INCLUDE : tg_ext.mk
+

Added: incubator/ooo/trunk/main/ucpp/prj/build.lst
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/ucpp/prj/build.lst?rev=1209396&view=auto
==============================================================================
--- incubator/ooo/trunk/main/ucpp/prj/build.lst (added)
+++ incubator/ooo/trunk/main/ucpp/prj/build.lst Fri Dec  2 10:46:37 2011
@@ -0,0 +1,3 @@
+ucpp      ucpp  :  NULL
+ucpp      ucpp     usr1           -       all     ucpp_mkout NULL
+ucpp      ucpp     nmake          -       all     ucpp_ucpp NULL

Added: incubator/ooo/trunk/main/ucpp/prj/d.lst
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/ucpp/prj/d.lst?rev=1209396&view=auto
==============================================================================
--- incubator/ooo/trunk/main/ucpp/prj/d.lst (added)
+++ incubator/ooo/trunk/main/ucpp/prj/d.lst Fri Dec  2 10:46:37 2011
@@ -0,0 +1,4 @@
+..\%__SRC%\bin\ucpp.exe %_DEST%\bin%_EXT%\ucpp.exe
+..\%__SRC%\bin\ucpp.pdb %_DEST%\bin%_EXT%\ucpp.pdb
+
+..\%__SRC%\bin\ucpp %_DEST%\bin%_EXT%\ucpp

Added: incubator/ooo/trunk/main/ucpp/ucpp.patch
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/ucpp/ucpp.patch?rev=1209396&view=auto
==============================================================================
--- incubator/ooo/trunk/main/ucpp/ucpp.patch (added)
+++ incubator/ooo/trunk/main/ucpp/ucpp.patch Fri Dec  2 10:46:37 2011
@@ -0,0 +1,57 @@
+--- misc/ucpp/makefile.mk	2011-09-21 14:52:57.436957300 +0200
++++ misc/build/ucpp/makefile.mk	2011-09-21 14:37:13.843986900 +0200
+@@ -1 +1,53 @@
+-dummy
++#*************************************************************************
++#
++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++# 
++# Copyright 2000, 2010 Oracle and/or its affiliates.
++#
++# OpenOffice.org - a multi-platform office productivity suite
++#
++# This file is part of OpenOffice.org.
++#
++# OpenOffice.org is free software: you can redistribute it and/or modify
++# it under the terms of the GNU Lesser General Public License version 3
++# only, as published by the Free Software Foundation.
++#
++# OpenOffice.org is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU Lesser General Public License version 3 for more details
++# (a copy is included in the LICENSE file that accompanied this code).
++#
++# You should have received a copy of the GNU Lesser General Public License
++# version 3 along with OpenOffice.org.  If not, see
++# <http://www.openoffice.org/license.html>
++# for a copy of the LGPLv3 License.
++#
++#*************************************************************************
++
++PRJ=..$/..$/..$/..
++
++PRJNAME=ucpp
++TARGET=ucpp
++TARGETTYPE=CUI
++LIBTARGET=NO
++
++EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
++
++# --- Settings -----------------------------------------------------
++.INCLUDE :  settings.mk
++
++# --- Files --------------------------------------------------------
++
++CFLAGS+= -DNO_UCPP_BUF -DUCPP_CONFIG -DSTAND_ALONE
++
++APP1TARGET= $(TARGET)
++APP1OBJS=   $(OBJ)$/assert.obj $(OBJ)$/cpp.obj $(OBJ)$/eval.obj $(OBJ)$/hash.obj $(OBJ)$/lexer.obj
$(OBJ)$/macro.obj $(OBJ)$/mem.obj $(OBJ)$/nhash.obj
++APP1RPATH=  SDK
++
++APP1STDLIBS=
++
++
++OBJFILES = $(APP1OBJS)
++
++.INCLUDE :  target.mk



Mime
View raw message