Remove some dead code (function scilab_timer_check). Found thanks to the code coverag... 06/10906/3
Sylvestre Ledru [Wed, 20 Mar 2013 13:54:03 +0000 (14:54 +0100)]
Change-Id: I300ceb570cfb7c5ca2d40474115cf3207f0af659

scilab/modules/core/Makefile.am
scilab/modules/core/Makefile.in
scilab/modules/core/includes/timerEvents.h [deleted file]
scilab/modules/core/src/c/core.vcxproj
scilab/modules/core/src/c/core.vcxproj.filters
scilab/modules/core/src/c/timer.c [deleted file]

index 66ff496..f9de45b 100644 (file)
@@ -35,7 +35,6 @@ src/c/scimem.c \
 src/c/banier.c \
 src/c/isanan.c \
 src/c/parse.c \
-src/c/timer.c \
 src/c/stack2.c \
 src/c/xscion.c \
 src/c/SetScilabEnvironment.c \
index 559adce..9cb5c22 100644 (file)
@@ -155,16 +155,16 @@ am__libscicore_algo_la_SOURCES_DIST = src/c/inffic.c src/c/cs2st.c \
        src/c/getmodules.c src/c/setgetSCIpath.c src/c/getmemory.c \
        src/c/Funtab.c src/c/csignal.c src/c/callinterf.c \
        src/c/scimem.c src/c/banier.c src/c/isanan.c src/c/parse.c \
-       src/c/timer.c src/c/stack2.c src/c/xscion.c \
-       src/c/SetScilabEnvironment.c src/c/returnanan.c \
-       src/c/LoadFunctionsTab.c src/c/with_module.c \
-       src/c/loadversion.c src/c/version.c src/c/stackinfo.c \
-       src/c/scirun.c src/c/SCIHOME.c src/c/warningmode.c \
-       src/c/InitializeCore.c src/c/TerminateCore.c src/c/coretable.c \
-       src/c/returnProperty.c src/c/returnPropertyList.c \
-       src/c/scilabmode.c src/c/GetXmlFileEncoding.c \
-       src/c/islittleendian.c src/c/terme.c src/c/ifexpr.c \
-       src/c/expr.c src/c/getcommandlineargs.c src/c/syncexec.c \
+       src/c/stack2.c src/c/xscion.c src/c/SetScilabEnvironment.c \
+       src/c/returnanan.c src/c/LoadFunctionsTab.c \
+       src/c/with_module.c src/c/loadversion.c src/c/version.c \
+       src/c/stackinfo.c src/c/scirun.c src/c/SCIHOME.c \
+       src/c/warningmode.c src/c/InitializeCore.c \
+       src/c/TerminateCore.c src/c/coretable.c src/c/returnProperty.c \
+       src/c/returnPropertyList.c src/c/scilabmode.c \
+       src/c/GetXmlFileEncoding.c src/c/islittleendian.c \
+       src/c/terme.c src/c/ifexpr.c src/c/expr.c \
+       src/c/getcommandlineargs.c src/c/syncexec.c \
        src/c/callFunctionFromGateway.c src/c/getvariablesname.c \
        src/c/commandwords.c src/c/freeArrayOfString.c \
        src/c/getstaticdebuginfo.c src/c/getdynamicdebuginfo.c \
@@ -237,8 +237,7 @@ am__objects_2 = libscicore_algo_la-inffic.lo \
        libscicore_algo_la-csignal.lo libscicore_algo_la-callinterf.lo \
        libscicore_algo_la-scimem.lo libscicore_algo_la-banier.lo \
        libscicore_algo_la-isanan.lo libscicore_algo_la-parse.lo \
-       libscicore_algo_la-timer.lo libscicore_algo_la-stack2.lo \
-       libscicore_algo_la-xscion.lo \
+       libscicore_algo_la-stack2.lo libscicore_algo_la-xscion.lo \
        libscicore_algo_la-SetScilabEnvironment.lo \
        libscicore_algo_la-returnanan.lo \
        libscicore_algo_la-LoadFunctionsTab.lo \
@@ -672,16 +671,16 @@ CORE_C_SOURCES = src/c/inffic.c src/c/cs2st.c src/c/tmpdir.c \
        src/c/getmodules.c src/c/setgetSCIpath.c src/c/getmemory.c \
        src/c/Funtab.c src/c/csignal.c src/c/callinterf.c \
        src/c/scimem.c src/c/banier.c src/c/isanan.c src/c/parse.c \
-       src/c/timer.c src/c/stack2.c src/c/xscion.c \
-       src/c/SetScilabEnvironment.c src/c/returnanan.c \
-       src/c/LoadFunctionsTab.c src/c/with_module.c \
-       src/c/loadversion.c src/c/version.c src/c/stackinfo.c \
-       src/c/scirun.c src/c/SCIHOME.c src/c/warningmode.c \
-       src/c/InitializeCore.c src/c/TerminateCore.c src/c/coretable.c \
-       src/c/returnProperty.c src/c/returnPropertyList.c \
-       src/c/scilabmode.c src/c/GetXmlFileEncoding.c \
-       src/c/islittleendian.c src/c/terme.c src/c/ifexpr.c \
-       src/c/expr.c src/c/getcommandlineargs.c src/c/syncexec.c \
+       src/c/stack2.c src/c/xscion.c src/c/SetScilabEnvironment.c \
+       src/c/returnanan.c src/c/LoadFunctionsTab.c \
+       src/c/with_module.c src/c/loadversion.c src/c/version.c \
+       src/c/stackinfo.c src/c/scirun.c src/c/SCIHOME.c \
+       src/c/warningmode.c src/c/InitializeCore.c \
+       src/c/TerminateCore.c src/c/coretable.c src/c/returnProperty.c \
+       src/c/returnPropertyList.c src/c/scilabmode.c \
+       src/c/GetXmlFileEncoding.c src/c/islittleendian.c \
+       src/c/terme.c src/c/ifexpr.c src/c/expr.c \
+       src/c/getcommandlineargs.c src/c/syncexec.c \
        src/c/callFunctionFromGateway.c src/c/getvariablesname.c \
        src/c/commandwords.c src/c/freeArrayOfString.c \
        src/c/getstaticdebuginfo.c src/c/getdynamicdebuginfo.c \
@@ -1162,7 +1161,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-syncexec.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-terme.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-texmacs.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-timer.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-tmpdir.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-transposeMatrix.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-typename.Plo@am__quote@
@@ -1431,13 +1429,6 @@ libscicore_algo_la-parse.lo: src/c/parse.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) $(libscicore_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libscicore_algo_la-parse.lo `test -f 'src/c/parse.c' || echo '$(srcdir)/'`src/c/parse.c
 
-libscicore_algo_la-timer.lo: src/c/timer.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libscicore_algo_la-timer.lo -MD -MP -MF $(DEPDIR)/libscicore_algo_la-timer.Tpo -c -o libscicore_algo_la-timer.lo `test -f 'src/c/timer.c' || echo '$(srcdir)/'`src/c/timer.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscicore_algo_la-timer.Tpo $(DEPDIR)/libscicore_algo_la-timer.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='src/c/timer.c' object='libscicore_algo_la-timer.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) $(libscicore_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libscicore_algo_la-timer.lo `test -f 'src/c/timer.c' || echo '$(srcdir)/'`src/c/timer.c
-
 libscicore_algo_la-stack2.lo: src/c/stack2.c
 @am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libscicore_algo_la-stack2.lo -MD -MP -MF $(DEPDIR)/libscicore_algo_la-stack2.Tpo -c -o libscicore_algo_la-stack2.lo `test -f 'src/c/stack2.c' || echo '$(srcdir)/'`src/c/stack2.c
 @am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscicore_algo_la-stack2.Tpo $(DEPDIR)/libscicore_algo_la-stack2.Plo
diff --git a/scilab/modules/core/includes/timerEvents.h b/scilab/modules/core/includes/timerEvents.h
deleted file mode 100644 (file)
index cfcb940..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2007 - INRIA - Sylvestre LEDRU
- * 
- * 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
- *
- */
-
-#ifndef __TIMEREVENTS_H__
-#define __TIMEREVENTS_H__
-/**
- * a time interval of dt microsec (dt=10000)
- * @return 1 if interval from last call is greater than 
-
- */
-int scilab_timer_check(void);
-
-#endif /* __TIMEREVENTS_H__ */
index 6140a79..8d53e2c 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
     <ProjectConfiguration Include="Debug|Win32">
@@ -369,7 +369,6 @@ cd ..
     <ClCompile Include="terme.c" />
     <ClCompile Include="TerminateCore.c" />
     <ClCompile Include="texmacs.c" />
-    <ClCompile Include="timer.c" />
     <ClCompile Include="tmpdir.c" />
     <ClCompile Include="transposeMatrix.c" />
     <ClCompile Include="typename.c" />
@@ -611,4 +610,4 @@ cd ..
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
\ No newline at end of file
+</Project>
index 36bab8e..d67c1e9 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup>
     <Filter Include="Source Files">
     <ClCompile Include="texmacs.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="timer.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="tmpdir.c">
       <Filter>Source Files</Filter>
     </ClCompile>
   <ItemGroup>
     <CustomBuildStep Include="..\..\includes\machine.h.vc" />
   </ItemGroup>
-</Project>
\ No newline at end of file
+</Project>
diff --git a/scilab/modules/core/src/c/timer.c b/scilab/modules/core/src/c/timer.c
deleted file mode 100644 (file)
index 6d63879..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) INRIA
- * Copyright (C) ENPC
- * 
- * 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
- *
- */
-#include <stdio.h>
-#include <time.h>
-#ifdef _MSC_VER
-       #include <windows.h>
-#else
-       #include <sys/time.h>
-#endif
-#include "timerEvents.h"
-/*--------------------------------------------------------------------------*/
-#define DT_TIMER 10000
-/*--------------------------------------------------------------------------*/
-#ifndef _MSC_VER
-       #define X_GETTIMEOFDAY(t) gettimeofday(t, (struct timezone*)0)
-#endif
-/*--------------------------------------------------------------------------*/
-#ifdef _MSC_VER
-static ULARGE_INTEGER ctime_old;
-static BOOL Initialize_ctime_old=TRUE;
-int scilab_timer_check(void)
-{
-       int rep=0;
-       ULARGE_INTEGER lctime;
-       FILETIME ftFileTime;
-
-       if (Initialize_ctime_old)
-       {
-               ctime_old.LowPart = 0;
-               ctime_old.HighPart = 0;
-               Initialize_ctime_old=FALSE;
-       }
-
-       GetSystemTimeAsFileTime(&ftFileTime); /* Resolution 100 nsec */
-       lctime.LowPart = ftFileTime.dwLowDateTime; 
-       lctime.HighPart = ftFileTime.dwHighDateTime;
-
-       rep = ( (lctime.QuadPart  - ctime_old.QuadPart)  > DT_TIMER ) ? 1 : 0 ;
-       if (rep) ctime_old=lctime;
-       return rep;
-}
-#else 
-int scilab_timer_check(void)
-{
-  int rep;
-  static struct timeval ctime_old;
-  struct timeval lctime;
-  X_GETTIMEOFDAY(&lctime);
-  rep = (lctime.tv_sec > ctime_old.tv_sec) ? 1  : ( lctime.tv_usec - ctime_old.tv_usec > DT_TIMER ) ? 1 : 0 ;
-  if (rep) ctime_old=lctime;
-  return rep;
-}
-#endif /* _MSC_VER */
-/*--------------------------------------------------------------------------*/