Remove dead code in the spreadsheet module 32/10332/2
Sylvestre Ledru [Mon, 28 Jan 2013 13:00:51 +0000 (14:00 +0100)]
Found thanks to the code coverage

Change-Id: I3b4e3650f90b1563de1eee5e89cb65aa280b2d24

scilab/modules/spreadsheet/Makefile.am
scilab/modules/spreadsheet/Makefile.in
scilab/modules/spreadsheet/license.txt
scilab/modules/spreadsheet/spreadsheet.vcxproj
scilab/modules/spreadsheet/spreadsheet.vcxproj.filters
scilab/modules/spreadsheet/src/c/stringsToDoubles.c [deleted file]
scilab/modules/spreadsheet/src/c/stringsToDoubles.h [deleted file]

index 7098b38..ba20a0c 100644 (file)
@@ -16,7 +16,6 @@ src/c/csvWrite.c \
 src/c/getRange.c \
 src/c/latintoutf.c \
 src/c/splitLine.c \
-src/c/stringsToDoubles.c \
 src/c/stringToComplex.c \
 src/c/utftolatin.c
 
index 2acfecd..cf1b04b 100644 (file)
@@ -144,7 +144,6 @@ am__objects_1 = libscispreadsheet_algo_la-xls.lo \
        libscispreadsheet_algo_la-getRange.lo \
        libscispreadsheet_algo_la-latintoutf.lo \
        libscispreadsheet_algo_la-splitLine.lo \
-       libscispreadsheet_algo_la-stringsToDoubles.lo \
        libscispreadsheet_algo_la-stringToComplex.lo \
        libscispreadsheet_algo_la-utftolatin.lo
 am__objects_2 = libscispreadsheet_algo_la-olestream-unwrap.lo \
@@ -464,7 +463,6 @@ src/c/csvWrite.c \
 src/c/getRange.c \
 src/c/latintoutf.c \
 src/c/splitLine.c \
-src/c/stringsToDoubles.c \
 src/c/stringToComplex.c \
 src/c/utftolatin.c
 
@@ -706,7 +704,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscispreadsheet_algo_la-ripole.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscispreadsheet_algo_la-splitLine.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscispreadsheet_algo_la-stringToComplex.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscispreadsheet_algo_la-stringsToDoubles.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscispreadsheet_algo_la-utftolatin.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscispreadsheet_algo_la-xls.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscispreadsheet_la-gw_csv_helpers.Plo@am__quote@
@@ -818,13 +815,6 @@ libscispreadsheet_algo_la-splitLine.lo: src/c/splitLine.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscispreadsheet_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libscispreadsheet_algo_la-splitLine.lo `test -f 'src/c/splitLine.c' || echo '$(srcdir)/'`src/c/splitLine.c
 
-libscispreadsheet_algo_la-stringsToDoubles.lo: src/c/stringsToDoubles.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscispreadsheet_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libscispreadsheet_algo_la-stringsToDoubles.lo -MD -MP -MF $(DEPDIR)/libscispreadsheet_algo_la-stringsToDoubles.Tpo -c -o libscispreadsheet_algo_la-stringsToDoubles.lo `test -f 'src/c/stringsToDoubles.c' || echo '$(srcdir)/'`src/c/stringsToDoubles.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscispreadsheet_algo_la-stringsToDoubles.Tpo $(DEPDIR)/libscispreadsheet_algo_la-stringsToDoubles.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='src/c/stringsToDoubles.c' object='libscispreadsheet_algo_la-stringsToDoubles.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscispreadsheet_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libscispreadsheet_algo_la-stringsToDoubles.lo `test -f 'src/c/stringsToDoubles.c' || echo '$(srcdir)/'`src/c/stringsToDoubles.c
-
 libscispreadsheet_algo_la-stringToComplex.lo: src/c/stringToComplex.c
 @am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscispreadsheet_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libscispreadsheet_algo_la-stringToComplex.lo -MD -MP -MF $(DEPDIR)/libscispreadsheet_algo_la-stringToComplex.Tpo -c -o libscispreadsheet_algo_la-stringToComplex.lo `test -f 'src/c/stringToComplex.c' || echo '$(srcdir)/'`src/c/stringToComplex.c
 @am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscispreadsheet_algo_la-stringToComplex.Tpo $(DEPDIR)/libscispreadsheet_algo_la-stringToComplex.Plo
index 95dc3a9..1be820c 100644 (file)
@@ -66,10 +66,8 @@ sci_gateway/cpp/sci_csvRead.cpp
 sci_gateway/cpp/sci_csvDefault.cpp
 sci_gateway/cpp/sci_csvIsnum.cpp
 src/cpp/stringToComplex.h
-src/cpp/stringsToDoubles.h
 src/cpp/stringToComplex.c
 src/cpp/stringToDouble.c
-src/cpp/stringsToDoubles.c
 src/cpp/stringToDouble.h
 
 
index 476db73..8106370 100644 (file)
     <ClInclude Include="src\c\ripole\pldstr.h" />
     <ClInclude Include="src\c\ripole\ripole.h" />
     <ClInclude Include="src\c\splitLine.h" />
-    <ClInclude Include="src\c\stringsToDoubles.h" />
     <ClInclude Include="src\c\stringToComplex.h" />
     <ClInclude Include="src\c\utftolatin.h" />
     <ClInclude Include="src\c\xls.h" />
     <ClCompile Include="sci_gateway\c\sci_csvDefault.c" />
     <ClCompile Include="sci_gateway\c\sci_csvIsnum.c" />
     <ClCompile Include="sci_gateway\c\sci_csvRead.c" />
-    <ClCompile Include="sci_gateway\c\sci_csvStringToDouble.c" />
     <ClCompile Include="sci_gateway\c\sci_csvTextScan.c" />
     <ClCompile Include="sci_gateway\c\sci_csvWrite.c" />
     <ClCompile Include="sci_gateway\c\sci_xls_open.c" />
     <ClCompile Include="src\c\ripole\pldstr.c" />
     <ClCompile Include="src\c\ripole\ripole.c" />
     <ClCompile Include="src\c\splitLine.c" />
-    <ClCompile Include="src\c\stringsToDoubles.c" />
     <ClCompile Include="src\c\stringToComplex.c" />
     <ClCompile Include="src\c\utftolatin.c" />
     <ClCompile Include="src\c\xls.c" />
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
\ No newline at end of file
+</Project>
index 7642ab3..4dd730b 100644 (file)
@@ -85,9 +85,6 @@
     <ClInclude Include="src\c\splitLine.h">
       <Filter>Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="src\c\stringsToDoubles.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
     <ClInclude Include="src\c\stringToComplex.h">
       <Filter>Header Files</Filter>
     </ClInclude>
     <ClCompile Include="src\c\splitLine.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="src\c\stringsToDoubles.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="src\c\stringToComplex.c">
       <Filter>Source Files</Filter>
     </ClCompile>
       <Filter>Source Files\ripole</Filter>
     </ClCompile>
   </ItemGroup>
-</Project>
\ No newline at end of file
+</Project>
diff --git a/scilab/modules/spreadsheet/src/c/stringsToDoubles.c b/scilab/modules/spreadsheet/src/c/stringsToDoubles.c
deleted file mode 100644 (file)
index 1750c81..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2010-2011 - DIGITEO - Allan CORNET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
- *
- * This code is also published under the GPL v3 license.
- *
- */
-#include "stringsToDoubles.h"
-#include "MALLOC.h"
-// =============================================================================
-double *stringsToDoubles(const char **pSTRs, int nbElements,
-                         BOOL bConvertByNAN, stringToDoubleError *ierr)
-{
-    double *dValues = NULL;
-
-    *ierr = STRINGTODOUBLE_ERROR;
-    if (nbElements <= 0)
-    {
-        return NULL;
-    }
-
-    if (pSTRs == NULL)
-    {
-        *ierr = STRINGTODOUBLE_MEMORY_ALLOCATION;
-    }
-    else
-    {
-        dValues = (double*)MALLOC(sizeof(double) * nbElements);
-        if (dValues)
-        {
-            int i = 0;
-            for (i = 0; i < nbElements; i++)
-            {
-                dValues[i] = stringToDouble(pSTRs[i], bConvertByNAN, ierr);
-                if (*ierr != STRINGTODOUBLE_NO_ERROR)
-                {
-                    FREE(dValues);
-                    return (dValues = NULL);
-                }
-            }
-        }
-        else
-        {
-            *ierr = STRINGTODOUBLE_MEMORY_ALLOCATION;
-        }
-    }
-    return dValues;
-}
-// =============================================================================
diff --git a/scilab/modules/spreadsheet/src/c/stringsToDoubles.h b/scilab/modules/spreadsheet/src/c/stringsToDoubles.h
deleted file mode 100644 (file)
index 4cb3f79..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2010-2011 - DIGITEO - Allan CORNET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
- *
- * This code is also published under the GPL v3 license.
- *
- */
-#ifndef __STRINGSTODOUBLES_H__
-#define __STRINGSTODOUBLES_H__
-
-#include "BOOL.h"
-#include "stringToDouble.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-    double *stringsToDoubles(const char **pSTRs, int nbElements,
-                             BOOL bConvertByNAN,
-                             stringToDoubleError *ierr);
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* __STRINGSTODOUBLES_H__ */
-// =============================================================================