newest added 30/3830/4
cedric Delamarre [Fri, 15 Apr 2011 11:42:19 +0000 (13:42 +0200)]
Change-Id: I2b40978f76457adc655571a750cfb02c807035b0

scilab/modules/fileio/Makefile.am
scilab/modules/fileio/Makefile.in
scilab/modules/fileio/fileio.vcproj
scilab/modules/fileio/includes/fileio_gw.hxx
scilab/modules/fileio/includes/gw_fileio.h
scilab/modules/fileio/includes/newest.h [new file with mode: 0644]
scilab/modules/fileio/sci_gateway/c/gw_fileio.c
scilab/modules/fileio/sci_gateway/cpp/fileio_gw.cpp
scilab/modules/fileio/sci_gateway/cpp/fileio_gw.vcproj
scilab/modules/fileio/sci_gateway/cpp/sci_newest.cpp [new file with mode: 0644]
scilab/modules/fileio/src/cpp/newest.cpp [new file with mode: 0644]

index c74714d..7b04e15 100644 (file)
@@ -59,13 +59,12 @@ sci_gateway/c/sci_getdrives.c \
 sci_gateway/c/sci_pathsep.c \
 sci_gateway/c/sci_chdir.c \
 sci_gateway/c/sci_pwd.c \
-sci_gateway/c/sci_mclearerr.c \
-sci_gateway/c/sci_merror.c \
-sci_gateway/c/sci_newest.c \
-sci_gateway/c/sci_get_absolute_file_path.c  \
-sci_gateway/c/sci_getrelativefilename.c \
 sci_gateway/c/sci_copyfile.c \
-sci_gateway/c/sci_movefile.c
+sci_gateway/c/sci_movefile.c \
+sci_gateway/c/sci_get_absolute_file_path.c \
+sci_gateway/c/sci_getrelativefilename.c \
+sci_gateway/c/sci_mclearerr.c \
+sci_gateway/c/sci_merror.c
 
 GATEWAY_CPP_SOURCES = \
        sci_gateway/cpp/fileio_gw.cpp \
@@ -94,8 +93,9 @@ GATEWAY_CPP_SOURCES = \
        sci_gateway/cpp/sci_mputstr.cpp \
        sci_gateway/cpp/sci_mgetstr.cpp \
        sci_gateway/cpp/sci_mseek.cpp \
-       sci_gateway/cpp/sci_mtell.cpp
-       
+       sci_gateway/cpp/sci_mtell.cpp \
+       sci_gateway/cpp/sci_newest.cpp
+
 FILEIO_CPP_SOURCES = \
        src/cpp/expandPathVariable.cpp \
        src/cpp/mopen.cpp \
@@ -107,8 +107,9 @@ FILEIO_CPP_SOURCES = \
        src/cpp/mgetstr.cpp \
        src/cpp/filemanager.cpp \
        src/cpp/mseek.cpp \
-       src/cpp/mtell.cpp
-       
+       src/cpp/mtell.cpp \
+       src/cpp/newest.cpp
+
 libscifileio_la_CPPFLAGS=      -I$(srcdir)/includes/ \
                                -I$(srcdir)/src/c/ \
                                -I$(srcdir)/src/cpp/ \
index f36cf5b..0a0682e 100644 (file)
@@ -154,7 +154,8 @@ am__objects_2 = libscifileio_algo_la-expandPathVariable.lo \
        libscifileio_algo_la-mputl.lo libscifileio_algo_la-mgetl.lo \
        libscifileio_algo_la-mgetstr.lo \
        libscifileio_algo_la-filemanager.lo \
-       libscifileio_algo_la-mseek.lo libscifileio_algo_la-mtell.lo
+       libscifileio_algo_la-mseek.lo libscifileio_algo_la-mtell.lo \
+       libscifileio_algo_la-newest.lo
 am_libscifileio_algo_la_OBJECTS = $(am__objects_1) $(am__objects_2)
 libscifileio_algo_la_OBJECTS = $(am_libscifileio_algo_la_OBJECTS)
 libscifileio_la_DEPENDENCIES = libscifileio-algo.la \
@@ -171,12 +172,11 @@ am__objects_3 = libscifileio_la-gw_fileio.lo \
        libscifileio_la-sci_maxfiles.lo \
        libscifileio_la-sci_getdrives.lo \
        libscifileio_la-sci_pathsep.lo libscifileio_la-sci_chdir.lo \
-       libscifileio_la-sci_pwd.lo libscifileio_la-sci_mclearerr.lo \
-       libscifileio_la-sci_merror.lo libscifileio_la-sci_newest.lo \
+       libscifileio_la-sci_pwd.lo libscifileio_la-sci_copyfile.lo \
+       libscifileio_la-sci_movefile.lo \
        libscifileio_la-sci_get_absolute_file_path.lo \
        libscifileio_la-sci_getrelativefilename.lo \
-       libscifileio_la-sci_copyfile.lo \
-       libscifileio_la-sci_movefile.lo
+       libscifileio_la-sci_mclearerr.lo libscifileio_la-sci_merror.lo
 am__objects_4 = libscifileio_la-fileio_gw.lo \
        libscifileio_la-sci_mopen.lo libscifileio_la-sci_mclose.lo \
        libscifileio_la-sci_mget.lo libscifileio_la-sci_mput.lo \
@@ -195,7 +195,8 @@ am__objects_4 = libscifileio_la-fileio_gw.lo \
        libscifileio_la-sci_fullpath.lo \
        libscifileio_la-sci_removedir.lo libscifileio_la-sci_meof.lo \
        libscifileio_la-sci_mputstr.lo libscifileio_la-sci_mgetstr.lo \
-       libscifileio_la-sci_mseek.lo libscifileio_la-sci_mtell.lo
+       libscifileio_la-sci_mseek.lo libscifileio_la-sci_mtell.lo \
+       libscifileio_la-sci_newest.lo
 am_libscifileio_la_OBJECTS = $(am__objects_3) $(am__objects_4)
 libscifileio_la_OBJECTS = $(am_libscifileio_la_OBJECTS)
 libscifileio_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
@@ -543,13 +544,12 @@ sci_gateway/c/sci_getdrives.c \
 sci_gateway/c/sci_pathsep.c \
 sci_gateway/c/sci_chdir.c \
 sci_gateway/c/sci_pwd.c \
-sci_gateway/c/sci_mclearerr.c \
-sci_gateway/c/sci_merror.c \
-sci_gateway/c/sci_newest.c \
-sci_gateway/c/sci_get_absolute_file_path.c  \
-sci_gateway/c/sci_getrelativefilename.c \
 sci_gateway/c/sci_copyfile.c \
-sci_gateway/c/sci_movefile.c
+sci_gateway/c/sci_movefile.c \
+sci_gateway/c/sci_get_absolute_file_path.c \
+sci_gateway/c/sci_getrelativefilename.c \
+sci_gateway/c/sci_mclearerr.c \
+sci_gateway/c/sci_merror.c
 
 GATEWAY_CPP_SOURCES = \
        sci_gateway/cpp/fileio_gw.cpp \
@@ -578,7 +578,8 @@ GATEWAY_CPP_SOURCES = \
        sci_gateway/cpp/sci_mputstr.cpp \
        sci_gateway/cpp/sci_mgetstr.cpp \
        sci_gateway/cpp/sci_mseek.cpp \
-       sci_gateway/cpp/sci_mtell.cpp
+       sci_gateway/cpp/sci_mtell.cpp \
+       sci_gateway/cpp/sci_newest.cpp
 
 FILEIO_CPP_SOURCES = \
        src/cpp/expandPathVariable.cpp \
@@ -591,7 +592,8 @@ FILEIO_CPP_SOURCES = \
        src/cpp/mgetstr.cpp \
        src/cpp/filemanager.cpp \
        src/cpp/mseek.cpp \
-       src/cpp/mtell.cpp
+       src/cpp/mtell.cpp \
+       src/cpp/newest.cpp
 
 libscifileio_la_CPPFLAGS = -I$(srcdir)/includes/ \
                                -I$(srcdir)/src/c/ \
@@ -853,6 +855,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscifileio_algo_la-mputl.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscifileio_algo_la-mseek.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscifileio_algo_la-mtell.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscifileio_algo_la-newest.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscifileio_algo_la-os_wfopen.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscifileio_algo_la-pathconvert.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscifileio_algo_la-readline.Plo@am__quote@
@@ -1292,26 +1295,19 @@ libscifileio_la-sci_pwd.lo: sci_gateway/c/sci_pwd.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) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -c -o libscifileio_la-sci_pwd.lo `test -f 'sci_gateway/c/sci_pwd.c' || echo '$(srcdir)/'`sci_gateway/c/sci_pwd.c
 
-libscifileio_la-sci_mclearerr.lo: sci_gateway/c/sci_mclearerr.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -MT libscifileio_la-sci_mclearerr.lo -MD -MP -MF $(DEPDIR)/libscifileio_la-sci_mclearerr.Tpo -c -o libscifileio_la-sci_mclearerr.lo `test -f 'sci_gateway/c/sci_mclearerr.c' || echo '$(srcdir)/'`sci_gateway/c/sci_mclearerr.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscifileio_la-sci_mclearerr.Tpo $(DEPDIR)/libscifileio_la-sci_mclearerr.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sci_gateway/c/sci_mclearerr.c' object='libscifileio_la-sci_mclearerr.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) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -c -o libscifileio_la-sci_mclearerr.lo `test -f 'sci_gateway/c/sci_mclearerr.c' || echo '$(srcdir)/'`sci_gateway/c/sci_mclearerr.c
-
-libscifileio_la-sci_merror.lo: sci_gateway/c/sci_merror.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -MT libscifileio_la-sci_merror.lo -MD -MP -MF $(DEPDIR)/libscifileio_la-sci_merror.Tpo -c -o libscifileio_la-sci_merror.lo `test -f 'sci_gateway/c/sci_merror.c' || echo '$(srcdir)/'`sci_gateway/c/sci_merror.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscifileio_la-sci_merror.Tpo $(DEPDIR)/libscifileio_la-sci_merror.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sci_gateway/c/sci_merror.c' object='libscifileio_la-sci_merror.lo' libtool=yes @AMDEPBACKSLASH@
+libscifileio_la-sci_copyfile.lo: sci_gateway/c/sci_copyfile.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -MT libscifileio_la-sci_copyfile.lo -MD -MP -MF $(DEPDIR)/libscifileio_la-sci_copyfile.Tpo -c -o libscifileio_la-sci_copyfile.lo `test -f 'sci_gateway/c/sci_copyfile.c' || echo '$(srcdir)/'`sci_gateway/c/sci_copyfile.c
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscifileio_la-sci_copyfile.Tpo $(DEPDIR)/libscifileio_la-sci_copyfile.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sci_gateway/c/sci_copyfile.c' object='libscifileio_la-sci_copyfile.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) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -c -o libscifileio_la-sci_merror.lo `test -f 'sci_gateway/c/sci_merror.c' || echo '$(srcdir)/'`sci_gateway/c/sci_merror.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -c -o libscifileio_la-sci_copyfile.lo `test -f 'sci_gateway/c/sci_copyfile.c' || echo '$(srcdir)/'`sci_gateway/c/sci_copyfile.c
 
-libscifileio_la-sci_newest.lo: sci_gateway/c/sci_newest.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -MT libscifileio_la-sci_newest.lo -MD -MP -MF $(DEPDIR)/libscifileio_la-sci_newest.Tpo -c -o libscifileio_la-sci_newest.lo `test -f 'sci_gateway/c/sci_newest.c' || echo '$(srcdir)/'`sci_gateway/c/sci_newest.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscifileio_la-sci_newest.Tpo $(DEPDIR)/libscifileio_la-sci_newest.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sci_gateway/c/sci_newest.c' object='libscifileio_la-sci_newest.lo' libtool=yes @AMDEPBACKSLASH@
+libscifileio_la-sci_movefile.lo: sci_gateway/c/sci_movefile.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -MT libscifileio_la-sci_movefile.lo -MD -MP -MF $(DEPDIR)/libscifileio_la-sci_movefile.Tpo -c -o libscifileio_la-sci_movefile.lo `test -f 'sci_gateway/c/sci_movefile.c' || echo '$(srcdir)/'`sci_gateway/c/sci_movefile.c
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscifileio_la-sci_movefile.Tpo $(DEPDIR)/libscifileio_la-sci_movefile.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sci_gateway/c/sci_movefile.c' object='libscifileio_la-sci_movefile.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) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -c -o libscifileio_la-sci_newest.lo `test -f 'sci_gateway/c/sci_newest.c' || echo '$(srcdir)/'`sci_gateway/c/sci_newest.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -c -o libscifileio_la-sci_movefile.lo `test -f 'sci_gateway/c/sci_movefile.c' || echo '$(srcdir)/'`sci_gateway/c/sci_movefile.c
 
 libscifileio_la-sci_get_absolute_file_path.lo: sci_gateway/c/sci_get_absolute_file_path.c
 @am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -MT libscifileio_la-sci_get_absolute_file_path.lo -MD -MP -MF $(DEPDIR)/libscifileio_la-sci_get_absolute_file_path.Tpo -c -o libscifileio_la-sci_get_absolute_file_path.lo `test -f 'sci_gateway/c/sci_get_absolute_file_path.c' || echo '$(srcdir)/'`sci_gateway/c/sci_get_absolute_file_path.c
@@ -1327,19 +1323,19 @@ libscifileio_la-sci_getrelativefilename.lo: sci_gateway/c/sci_getrelativefilenam
 @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) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -c -o libscifileio_la-sci_getrelativefilename.lo `test -f 'sci_gateway/c/sci_getrelativefilename.c' || echo '$(srcdir)/'`sci_gateway/c/sci_getrelativefilename.c
 
-libscifileio_la-sci_copyfile.lo: sci_gateway/c/sci_copyfile.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -MT libscifileio_la-sci_copyfile.lo -MD -MP -MF $(DEPDIR)/libscifileio_la-sci_copyfile.Tpo -c -o libscifileio_la-sci_copyfile.lo `test -f 'sci_gateway/c/sci_copyfile.c' || echo '$(srcdir)/'`sci_gateway/c/sci_copyfile.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscifileio_la-sci_copyfile.Tpo $(DEPDIR)/libscifileio_la-sci_copyfile.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sci_gateway/c/sci_copyfile.c' object='libscifileio_la-sci_copyfile.lo' libtool=yes @AMDEPBACKSLASH@
+libscifileio_la-sci_mclearerr.lo: sci_gateway/c/sci_mclearerr.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -MT libscifileio_la-sci_mclearerr.lo -MD -MP -MF $(DEPDIR)/libscifileio_la-sci_mclearerr.Tpo -c -o libscifileio_la-sci_mclearerr.lo `test -f 'sci_gateway/c/sci_mclearerr.c' || echo '$(srcdir)/'`sci_gateway/c/sci_mclearerr.c
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscifileio_la-sci_mclearerr.Tpo $(DEPDIR)/libscifileio_la-sci_mclearerr.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sci_gateway/c/sci_mclearerr.c' object='libscifileio_la-sci_mclearerr.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) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -c -o libscifileio_la-sci_copyfile.lo `test -f 'sci_gateway/c/sci_copyfile.c' || echo '$(srcdir)/'`sci_gateway/c/sci_copyfile.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -c -o libscifileio_la-sci_mclearerr.lo `test -f 'sci_gateway/c/sci_mclearerr.c' || echo '$(srcdir)/'`sci_gateway/c/sci_mclearerr.c
 
-libscifileio_la-sci_movefile.lo: sci_gateway/c/sci_movefile.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -MT libscifileio_la-sci_movefile.lo -MD -MP -MF $(DEPDIR)/libscifileio_la-sci_movefile.Tpo -c -o libscifileio_la-sci_movefile.lo `test -f 'sci_gateway/c/sci_movefile.c' || echo '$(srcdir)/'`sci_gateway/c/sci_movefile.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscifileio_la-sci_movefile.Tpo $(DEPDIR)/libscifileio_la-sci_movefile.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sci_gateway/c/sci_movefile.c' object='libscifileio_la-sci_movefile.lo' libtool=yes @AMDEPBACKSLASH@
+libscifileio_la-sci_merror.lo: sci_gateway/c/sci_merror.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -MT libscifileio_la-sci_merror.lo -MD -MP -MF $(DEPDIR)/libscifileio_la-sci_merror.Tpo -c -o libscifileio_la-sci_merror.lo `test -f 'sci_gateway/c/sci_merror.c' || echo '$(srcdir)/'`sci_gateway/c/sci_merror.c
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscifileio_la-sci_merror.Tpo $(DEPDIR)/libscifileio_la-sci_merror.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sci_gateway/c/sci_merror.c' object='libscifileio_la-sci_merror.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) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -c -o libscifileio_la-sci_movefile.lo `test -f 'sci_gateway/c/sci_movefile.c' || echo '$(srcdir)/'`sci_gateway/c/sci_movefile.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -c -o libscifileio_la-sci_merror.lo `test -f 'sci_gateway/c/sci_merror.c' || echo '$(srcdir)/'`sci_gateway/c/sci_merror.c
 
 .cpp.o:
 @am__fastdepCXX_TRUE@  $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -1439,6 +1435,13 @@ libscifileio_algo_la-mtell.lo: src/cpp/mtell.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscifileio_algo_la-mtell.lo `test -f 'src/cpp/mtell.cpp' || echo '$(srcdir)/'`src/cpp/mtell.cpp
 
+libscifileio_algo_la-newest.lo: src/cpp/newest.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscifileio_algo_la-newest.lo -MD -MP -MF $(DEPDIR)/libscifileio_algo_la-newest.Tpo -c -o libscifileio_algo_la-newest.lo `test -f 'src/cpp/newest.cpp' || echo '$(srcdir)/'`src/cpp/newest.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscifileio_algo_la-newest.Tpo $(DEPDIR)/libscifileio_algo_la-newest.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='src/cpp/newest.cpp' object='libscifileio_algo_la-newest.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscifileio_algo_la-newest.lo `test -f 'src/cpp/newest.cpp' || echo '$(srcdir)/'`src/cpp/newest.cpp
+
 libscifileio_la-fileio_gw.lo: sci_gateway/cpp/fileio_gw.cpp
 @am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscifileio_la-fileio_gw.lo -MD -MP -MF $(DEPDIR)/libscifileio_la-fileio_gw.Tpo -c -o libscifileio_la-fileio_gw.lo `test -f 'sci_gateway/cpp/fileio_gw.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/fileio_gw.cpp
 @am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscifileio_la-fileio_gw.Tpo $(DEPDIR)/libscifileio_la-fileio_gw.Plo
@@ -1628,6 +1631,13 @@ libscifileio_la-sci_mtell.lo: sci_gateway/cpp/sci_mtell.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscifileio_la-sci_mtell.lo `test -f 'sci_gateway/cpp/sci_mtell.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_mtell.cpp
 
+libscifileio_la-sci_newest.lo: sci_gateway/cpp/sci_newest.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscifileio_la-sci_newest.lo -MD -MP -MF $(DEPDIR)/libscifileio_la-sci_newest.Tpo -c -o libscifileio_la-sci_newest.lo `test -f 'sci_gateway/cpp/sci_newest.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_newest.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscifileio_la-sci_newest.Tpo $(DEPDIR)/libscifileio_la-sci_newest.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='sci_gateway/cpp/sci_newest.cpp' object='libscifileio_la-sci_newest.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscifileio_la-sci_newest.lo `test -f 'sci_gateway/cpp/sci_newest.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_newest.cpp
+
 mostlyclean-libtool:
        -rm -f *.lo
 
index ebb91b8..cdc9334 100644 (file)
                                >
                        </File>
                        <File
+                               RelativePath=".\src\cpp\newest.cpp"
+                               >
+                       </File>
+                       <File
                                RelativePath=".\src\c\os_wfopen.c"
                                >
                        </File>
                                >
                        </File>
                        <File
+                               RelativePath=".\includes\newest.h"
+                               >
+                       </File>
+                       <File
                                RelativePath=".\includes\os_wfopen.h"
                                >
                        </File>
index 8988ffa..1f8bb1d 100644 (file)
@@ -62,6 +62,6 @@ CPP_GATEWAY_PROTOTYPE(sci_mputstr);
 CPP_GATEWAY_PROTOTYPE(sci_mgetstr);
 CPP_GATEWAY_PROTOTYPE(sci_mseek);
 CPP_GATEWAY_PROTOTYPE(sci_mtell);
-
+CPP_GATEWAY_PROTOTYPE(sci_newest);
 
 #endif /* !__FILEIO_GW_HXX__ */
index a5b20b9..9dd0513 100644 (file)
@@ -26,7 +26,6 @@ FILEIO_IMPEXP int sci_fscanf(char *fname,unsigned long fname_len);
 FILEIO_IMPEXP int sci_maxfiles(char *fname,unsigned long fname_len);
 FILEIO_IMPEXP int sci_getdrives(char *fname,unsigned long fname_len);
 FILEIO_IMPEXP int sci_pathsep(char *fname,unsigned long fname_len);
-FILEIO_IMPEXP int sci_newest(char *fname,unsigned long fname_len);
 FILEIO_IMPEXP int sci_getrelativefilename(char *fname, unsigned long l);
 FILEIO_IMPEXP int sci_get_absolute_file_path(char *fname,unsigned long fname_len);
 
diff --git a/scilab/modules/fileio/includes/newest.h b/scilab/modules/fileio/includes/newest.h
new file mode 100644 (file)
index 0000000..0683345
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) 2011 - DIGITEO - Cedric DELAMARRE
+* 
+* 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 __NEWEST_H__
+#define __NEWEST_H__
+
+#include "dynlib_fileio.h"
+
+FILEIO_IMPEXP int newest(wchar_t** _pwcsFilesString, int _iNbrOfFileString);
+
+#endif /* !__NEWEST_H__ */
+
index 9923fe4..42cb26b 100644 (file)
@@ -52,7 +52,7 @@ static gw_generic_table Tab[]={
        {NULL, ""}, //pwd
        {NULL, ""}, //chdir
        {NULL, ""}, //fileinfo
-       {sci_newest,"newest"},
+       {NULL, ""}, //newest
        {sci_getrelativefilename,"getrelativefilename"},
        {sci_get_absolute_file_path,"get_absolute_file_path"},
        {NULL, ""}, //copyfile
index 925f120..2e68a87 100644 (file)
@@ -52,7 +52,8 @@ bool FileioModule::Load()
     symbol::Context::getInstance()->AddFunction(Function::createFunction(L"mputstr", &sci_mputstr, MODULE_NAME));
     symbol::Context::getInstance()->AddFunction(Function::createFunction(L"mgetstr", &sci_mgetstr, MODULE_NAME));
     symbol::Context::getInstance()->AddFunction(Function::createFunction(L"mseek", &sci_mseek, MODULE_NAME));
-    symbol::Context::getInstance()->AddFunction(Function::createFunction(L"mtell", &sci_mtell, MODULE_NAME));    
-    
+    symbol::Context::getInstance()->AddFunction(Function::createFunction(L"mtell", &sci_mtell, MODULE_NAME));
+    symbol::Context::getInstance()->AddFunction(Function::createFunction(L"newest", &sci_newest, MODULE_NAME));
+
     return true;
 }
index 8b71138..b7a6ac0 100644 (file)
                                >
                        </File>
                        <File
+                               RelativePath=".\sci_newest.cpp"
+                               >
+                       </File>
+                       <File
                                RelativePath=".\sci_pathconvert.cpp"
                                >
                        </File>
diff --git a/scilab/modules/fileio/sci_gateway/cpp/sci_newest.cpp b/scilab/modules/fileio/sci_gateway/cpp/sci_newest.cpp
new file mode 100644 (file)
index 0000000..f5d95ce
--- /dev/null
@@ -0,0 +1,109 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2011 - Digiteo - Cedric DELAMARRE
+ *
+ *
+ * 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 "funcmanager.hxx"
+#include "fileio_gw.hxx"
+#include "function.hxx"
+#include "string.hxx"
+#include "filemanager.hxx"
+
+extern "C"
+{
+#include <stdio.h>
+#include <string.h>
+//#include "removedir.h"
+//#include "isdir.h"
+#include "expandPathVariable.h"
+#include "Scierror.h"
+#include "localization.h"
+#include "newest.h"
+}
+/*--------------------------------------------------------------------------*/
+
+
+types::Function::ReturnValue sci_newest(types::typed_list &in, int _iRetCount, types::typed_list &out)
+{
+    int dimsArray[2]                = {1,1};
+    int iRet                        = 0;
+    int iNbrString                  = 0;
+    wchar_t** pwcsStringInput       = NULL;
+    types::Double* pStringOutput    = NULL;
+
+    if(in.size() == 0)
+    {
+        out.push_back(types::Double::Empty());
+        return types::Function::OK;
+    }
+
+    if(in.size() == 1)
+    {
+        if(in[0]->isString() == FALSE)
+        {
+            if(in[0]->getAs<types::GenericType>()->getSize() == 0)
+            {
+                out.push_back(types::Double::Empty());
+                return types::Function::OK;
+            }
+            else
+            {
+                ScierrorW(999,_W("%ls: Wrong type for input argument #%d: A String(s) expected.\n"), L"newest", 1);
+                return types::Function::Error;
+            }
+        }
+
+        if(in[0]->getAs<types::String>()->isScalar())
+        {
+            pStringOutput = new types::Double(2,dimsArray);
+            pStringOutput->set(0, 1);
+            out.push_back(pStringOutput);
+            return types::Function::OK;
+        }
+        else
+        {
+            int size = in[0]->getAs<types::String>()->getSize();
+            pwcsStringInput = (wchar_t**)MALLOC(size * sizeof(wchar_t*));
+            for(iNbrString = 0; iNbrString < size; iNbrString++)
+            {
+                pwcsStringInput[iNbrString] = in[0]->getAs<types::String>()->get(iNbrString);
+            }
+
+            iRet = newest(pwcsStringInput, iNbrString);
+
+            pStringOutput = new types::Double(2,dimsArray);
+            pStringOutput->set(0, iRet);
+            out.push_back(pStringOutput);
+        }
+    }
+    else
+    {
+        pwcsStringInput = (wchar_t**)MALLOC(in.size() * sizeof(wchar_t*));
+        for(iNbrString = 0; iNbrString < in.size(); iNbrString++)
+        {
+            if(in[iNbrString]->isString() == FALSE)
+            {
+                ScierrorW(999,_W("%ls: Wrong type for input argument #%d: A String(s) expected.\n"), L"newest", iNbrString);
+                return types::Function::Error;
+            }
+            pwcsStringInput[iNbrString] = in[iNbrString]->getAs<types::String>()->get(0);
+        }
+
+        iRet = newest(pwcsStringInput, iNbrString);
+
+        pStringOutput = new types::Double(2,dimsArray);
+        pStringOutput->set(0, iRet);
+        out.push_back(pStringOutput);
+    }
+    
+    return types::Function::OK;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/scilab/modules/fileio/src/cpp/newest.cpp b/scilab/modules/fileio/src/cpp/newest.cpp
new file mode 100644 (file)
index 0000000..3d369af
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) 2011 - DIGITEO - Cedric DELAMARRE
+* Copyright (C) 2006 - INRIA - 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
+*
+*/
+#include <sys/stat.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "filemanager.hxx"
+
+extern "C"
+{
+//#include "PATH_MAX.h"
+//#include "gw_io.h"
+#include "MALLOC.h"
+//#include "sciprint.h"
+//#include "stack-c.h"
+#include "expandPathVariable.h"
+//#include "Scierror.h"
+//#include "localization.h"
+//#include "freeArrayOfString.h"
+#include "charEncoding.h"
+//#include "os_strdup.h"
+#include "newest.h"
+}
+
+int newest(wchar_t** _pwcsFilesString, int _iNbrOfFileString)
+{
+#ifdef _MSC_VER
+       struct _stat buf;
+#else
+       struct stat buf;
+#endif
+
+       int i=0;
+       int RetVal=0;
+
+       int RetIndex=1;
+       long int MaxTime=0;
+
+       for (i = 0; i<_iNbrOfFileString ;i++)
+       {
+
+               int resultstat = 0;
+               wchar_t *FileName = NULL;
+
+               FileName = expandPathVariableW(_pwcsFilesString[i]);
+
+#ifdef _MSC_VER
+               if (FileName)
+               {
+                       if ( (FileName[wcslen(FileName)-1]==L'/') || (FileName[wcslen(FileName)-1]==L'\\') )
+                       {
+                               FileName[wcslen(FileName)-1]=L'\0';
+                       }
+
+               }
+               resultstat = _wstat(FileName, &buf );
+#else
+        char* temp = wide_string_to_UTF8(FileName);
+               resultstat = stat(temp, &buf );
+               FREE(temp);
+#endif
+               if (resultstat == 0)
+               {
+                       if ((long int)buf.st_mtime>MaxTime)
+                       {
+                               MaxTime=(long int)buf.st_mtime;
+                               RetIndex=i+1;
+                       }
+               }
+
+               FREE(FileName);
+               FileName = NULL;
+       }
+
+       RetVal=RetIndex;
+       return RetVal;
+}