Remove some dead code (function getNewTerm). Found thanks to the code coverage... 07/10907/3
Sylvestre Ledru [Wed, 20 Mar 2013 13:57:19 +0000 (14:57 +0100)]
Change-Id: I7d724fc8655ac39069d15c0e477277554354d07a

scilab/modules/core/Makefile.am
scilab/modules/core/Makefile.in
scilab/modules/core/includes/windowsChangeManagement.h [deleted file]
scilab/modules/core/src/c/signal_mgmt.c
scilab/modules/core/src/c/windowsChangeManagement.c [deleted file]

index f9de45b..42c0b01 100644 (file)
@@ -90,7 +90,6 @@ src/c/storeCommand.c \
 src/c/backtrace.c \
 src/c/signal_mgmt.c \
 src/c/suspendProcess.c \
-src/c/windowsChangeManagement.c \
 src/c/setieee.c \
 src/c/setlines.c \
 src/c/setformat.c \
index 9cb5c22..6bcf361 100644 (file)
@@ -178,10 +178,9 @@ am__libscicore_algo_la_SOURCES_DIST = src/c/inffic.c src/c/cs2st.c \
        src/c/exitCodeValue.c src/c/getversion.c \
        src/c/dynamic_tclsci.c src/c/dynamic_parallel.c \
        src/c/storeCommand.c src/c/backtrace.c src/c/signal_mgmt.c \
-       src/c/suspendProcess.c src/c/windowsChangeManagement.c \
-       src/c/setieee.c src/c/setlines.c src/c/setformat.c \
-       src/c/InitializePreferences.c src/c/sci_tools.c \
-       src/c/getmaxMALLOC.c src/c/sci_mem_alloc.c \
+       src/c/suspendProcess.c src/c/setieee.c src/c/setlines.c \
+       src/c/setformat.c src/c/InitializePreferences.c \
+       src/c/sci_tools.c src/c/getmaxMALLOC.c src/c/sci_mem_alloc.c \
        src/c/hashtable/hashtable.c src/c/hashtable/hashtable_itr.c \
        src/c/hashtable/hashtable_utility.c src/c/scimem64.c \
        src/cpp/hashtable_core.cpp src/cpp/namstr.cpp \
@@ -286,7 +285,6 @@ am__objects_2 = libscicore_algo_la-inffic.lo \
        libscicore_algo_la-backtrace.lo \
        libscicore_algo_la-signal_mgmt.lo \
        libscicore_algo_la-suspendProcess.lo \
-       libscicore_algo_la-windowsChangeManagement.lo \
        libscicore_algo_la-setieee.lo libscicore_algo_la-setlines.lo \
        libscicore_algo_la-setformat.lo \
        libscicore_algo_la-InitializePreferences.lo \
@@ -694,10 +692,9 @@ CORE_C_SOURCES = src/c/inffic.c src/c/cs2st.c src/c/tmpdir.c \
        src/c/exitCodeValue.c src/c/getversion.c \
        src/c/dynamic_tclsci.c src/c/dynamic_parallel.c \
        src/c/storeCommand.c src/c/backtrace.c src/c/signal_mgmt.c \
-       src/c/suspendProcess.c src/c/windowsChangeManagement.c \
-       src/c/setieee.c src/c/setlines.c src/c/setformat.c \
-       src/c/InitializePreferences.c src/c/sci_tools.c \
-       src/c/getmaxMALLOC.c src/c/sci_mem_alloc.c \
+       src/c/suspendProcess.c src/c/setieee.c src/c/setlines.c \
+       src/c/setformat.c src/c/InitializePreferences.c \
+       src/c/sci_tools.c src/c/getmaxMALLOC.c src/c/sci_mem_alloc.c \
        src/c/hashtable/hashtable.c src/c/hashtable/hashtable_itr.c \
        src/c/hashtable/hashtable_utility.c $(am__append_1)
 CORE_CXX_SOURCES = src/cpp/hashtable_core.cpp \
@@ -1166,7 +1163,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-typename.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-version.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-warningmode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-windowsChangeManagement.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-with_module.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-xscion.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_la-gw_core.Plo@am__quote@
@@ -1814,13 +1810,6 @@ libscicore_algo_la-suspendProcess.lo: src/c/suspendProcess.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-suspendProcess.lo `test -f 'src/c/suspendProcess.c' || echo '$(srcdir)/'`src/c/suspendProcess.c
 
-libscicore_algo_la-windowsChangeManagement.lo: src/c/windowsChangeManagement.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-windowsChangeManagement.lo -MD -MP -MF $(DEPDIR)/libscicore_algo_la-windowsChangeManagement.Tpo -c -o libscicore_algo_la-windowsChangeManagement.lo `test -f 'src/c/windowsChangeManagement.c' || echo '$(srcdir)/'`src/c/windowsChangeManagement.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscicore_algo_la-windowsChangeManagement.Tpo $(DEPDIR)/libscicore_algo_la-windowsChangeManagement.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='src/c/windowsChangeManagement.c' object='libscicore_algo_la-windowsChangeManagement.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-windowsChangeManagement.lo `test -f 'src/c/windowsChangeManagement.c' || echo '$(srcdir)/'`src/c/windowsChangeManagement.c
-
 libscicore_algo_la-setieee.lo: src/c/setieee.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-setieee.lo -MD -MP -MF $(DEPDIR)/libscicore_algo_la-setieee.Tpo -c -o libscicore_algo_la-setieee.lo `test -f 'src/c/setieee.c' || echo '$(srcdir)/'`src/c/setieee.c
 @am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscicore_algo_la-setieee.Tpo $(DEPDIR)/libscicore_algo_la-setieee.Plo
diff --git a/scilab/modules/core/includes/windowsChangeManagement.h b/scilab/modules/core/includes/windowsChangeManagement.h
deleted file mode 100644 (file)
index 4871c79..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-* Copyright (C) 2011 - DIGITEO - Karim Mamode
-*
-* 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                GET_SIGNAL_H_
-#define        GET_SIGNAL_H_
-
-/**
- * Clear screen and get new terminfo,
- * This is a sighandler_t used when SIGWINCH is caught
- * @param signal caught.
- */
-void getNewTerm(int signum);
-
-#endif /* !SIGNAL_H_ */
index 07db662..f45a43e 100644 (file)
@@ -40,7 +40,6 @@
 #include "Scierror.h"
 #include "suspendProcess.h"
 #include "scilabmode.h"
-#include "windowsChangeManagement.h"
 #include "backtrace_print.h"
 extern jmp_buf jmp_env;
 
diff --git a/scilab/modules/core/src/c/windowsChangeManagement.c b/scilab/modules/core/src/c/windowsChangeManagement.c
deleted file mode 100644 (file)
index e5ef995..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
-* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-* Copyright (C) 2011 - DIGITEO - Karim Mamode
-*
-* 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 <unistd.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <curses.h>
-#include <term.h>
-#include "getKey.h"
-#include "termcapManagement.h"
-#include "cliPrompt.h"
-#include "windowsChangeManagement.h"
-#include "HistoryManager.h"
-
-/*
- * Get new terminfo
- * sighandler_t called by signal SIGWINCH.
- */
-void getNewTerm(int signum)
-{
-    char *termEnv;
-
-    char *currentLine = NULL;
-
-    setStringCapacities("cl");
-    /* get new terminfo */
-    if (((termEnv = getenv("TERM")) == NULL) || (tgetent(NULL, termEnv) == ERR))
-    {
-        fprintf(stderr, "\nCannot get terminfo databases. Termcaps are no longer available\n");
-    }
-    printPrompt(WRITE_PROMPT);
-    currentLine = getSearchedTokenInScilabHistory();
-    if (currentLine != NULL)
-    {
-        printf("%s", currentLine);
-        fflush(stdout);
-    }
-    signal(signum, getNewTerm);
-}