summaryrefslogtreecommitdiffstats
path: root/scilab/modules/io
diff options
context:
space:
mode:
authorAllan CORNET <allan.cornet@scilab.org>2010-04-21 13:14:59 +0200
committerPierre MARECHAL <pierre.marechal@scilab.org>2010-04-22 09:32:18 +0200
commit5f4bae1872344cc3dc61a6d58b786971580ba48c (patch)
tree535a64527885a75f0918a128bf8ca786e1e02666 /scilab/modules/io
parente3061582f79692700220dfea90df88319cf5001a (diff)
downloadscilab-5f4bae1872344cc3dc61a6d58b786971580ba48c.zip
scilab-5f4bae1872344cc3dc61a6d58b786971580ba48c.tar.gz
bug 4996
Change-Id: I8176c1d49dc819f85a1493fe075970c7c9bc0257
Diffstat (limited to 'scilab/modules/io')
-rw-r--r--scilab/modules/io/Makefile.am14
-rw-r--r--[-rwxr-xr-x]scilab/modules/io/Makefile.in49
-rw-r--r--scilab/modules/io/includes/gw_io.h2
-rw-r--r--scilab/modules/io/sci_gateway/c/gw_io.c2
-rw-r--r--scilab/modules/io/sci_gateway/c/sci_mgetl.c271
-rw-r--r--scilab/modules/io/sci_gateway/fortran/intmgetl.f179
-rw-r--r--scilab/modules/io/sci_gateway/io_gateway.xml2
-rw-r--r--scilab/modules/io/src/c/io.vcproj12
-rw-r--r--scilab/modules/io/src/c/mgetl.c152
-rw-r--r--scilab/modules/io/src/c/mgetl.h44
-rw-r--r--scilab/modules/io/src/fortran/io_f.vfproj1
-rw-r--r--scilab/modules/io/src/fortran/io_f2c.vcproj11
-rw-r--r--scilab/modules/io/tests/nonreg_tests/bug_2059.dia.ref12
-rw-r--r--scilab/modules/io/tests/nonreg_tests/bug_2059.tst17
-rw-r--r--scilab/modules/io/tests/nonreg_tests/bug_2059.txt4
-rw-r--r--scilab/modules/io/tests/nonreg_tests/bug_2610.dia.ref11
-rw-r--r--scilab/modules/io/tests/nonreg_tests/bug_2610.tst21
-rw-r--r--scilab/modules/io/tests/nonreg_tests/bug_3427.dia.ref28
-rw-r--r--scilab/modules/io/tests/nonreg_tests/bug_3427.tst33
-rw-r--r--scilab/modules/io/tests/nonreg_tests/bug_3478.dia.ref2
-rw-r--r--scilab/modules/io/tests/nonreg_tests/bug_3478.tst2
21 files changed, 22 insertions, 847 deletions
diff --git a/scilab/modules/io/Makefile.am b/scilab/modules/io/Makefile.am
index 5109d66..58746ff 100644
--- a/scilab/modules/io/Makefile.am
+++ b/scilab/modules/io/Makefile.am
@@ -7,7 +7,6 @@ IO_C_SOURCES = src/c/getpidc.c \
7src/c/setenvc.c \ 7src/c/setenvc.c \
8src/c/systemc.c \ 8src/c/systemc.c \
9src/c/getenvc.c \ 9src/c/getenvc.c \
10src/c/mgetl.c \
11src/c/GetenvB.c 10src/c/GetenvB.c
12 11
13IO_FORTRAN_SOURCES = src/fortran/v2unit.f \ 12IO_FORTRAN_SOURCES = src/fortran/v2unit.f \
@@ -26,7 +25,6 @@ sci_gateway/c/sci_write.c \
26sci_gateway/c/sci_writeb.c \ 25sci_gateway/c/sci_writeb.c \
27sci_gateway/c/sci_setenv.c \ 26sci_gateway/c/sci_setenv.c \
28sci_gateway/c/gw_io.c \ 27sci_gateway/c/gw_io.c \
29sci_gateway/c/sci_mgetl.c \
30sci_gateway/c/sci_read.c \ 28sci_gateway/c/sci_read.c \
31sci_gateway/c/sci_getpid.c \ 29sci_gateway/c/sci_getpid.c \
32sci_gateway/c/sci_write4b.c \ 30sci_gateway/c/sci_write4b.c \
@@ -45,7 +43,7 @@ sci_gateway/fortran/intfile.f
45 43
46# Disable optimisation of the file intmgetl.f 44# Disable optimisation of the file intmgetl.f
47noinst_LTLIBRARIES = libdummy-io.la 45noinst_LTLIBRARIES = libdummy-io.la
48libdummy_io_la_SOURCES = sci_gateway/fortran/intmgetl.f 46libdummy_io_la_SOURCES =
49libdummy_io_la_FFLAGS = $(FFLAGS:-O%=) 47libdummy_io_la_FFLAGS = $(FFLAGS:-O%=)
50 48
51libsciio_la_CFLAGS= -I$(srcdir)/includes/ \ 49libsciio_la_CFLAGS= -I$(srcdir)/includes/ \
@@ -71,11 +69,7 @@ libsciio_la_SOURCES = $(IO_C_SOURCES) $(IO_FORTRAN_SOURCES) $(GATEWAY_C_SOURCES)
71CHECK_SRC= $(IO_C_SOURCES) $(GATEWAY_C_SOURCES) 69CHECK_SRC= $(IO_C_SOURCES) $(GATEWAY_C_SOURCES)
72INCLUDE_FLAGS = $(libsciio_la_CFLAGS) 70INCLUDE_FLAGS = $(libsciio_la_CFLAGS)
73 71
74libsciio_la_LIBADD = libdummy-io.la $(top_builddir)/modules/core/libscicore.la $(top_builddir)/modules/arnoldi/libsciarnoldi.la $(top_builddir)/modules/elementary_functions/libscielementary_functions.la $(top_builddir)/modules/tclsci/libscitclsci.la $(top_builddir)/modules/fileio/libscifileio.la $(top_builddir)/modules/integer/libsciinteger.la $(top_builddir)/modules/string/libscistring.la $(top_builddir)/libs/MALLOC/libscimalloc.la $(top_builddir)/modules/output_stream/libscioutput_stream.la 72libsciio_la_LIBADD = $(top_builddir)/modules/core/libscicore.la $(top_builddir)/modules/arnoldi/libsciarnoldi.la $(top_builddir)/modules/elementary_functions/libscielementary_functions.la $(top_builddir)/modules/tclsci/libscitclsci.la $(top_builddir)/modules/fileio/libscifileio.la $(top_builddir)/modules/integer/libsciinteger.la $(top_builddir)/modules/string/libscistring.la $(top_builddir)/libs/MALLOC/libscimalloc.la $(top_builddir)/modules/output_stream/libscioutput_stream.la
75
76
77libdummy_io_la-intmgetl.lo: sci_gateway/fortran/intmgetl.f
78 $(LIBTOOL) --tag=F77 --mode=compile $(F77) $(libdummy_io_la_FFLAGS) -c -o libdummy_io_la-intmgetl.lo `test -f 'sci_gateway/fortran/intmgetl.f' || echo '$(srcdir)/'`sci_gateway/fortran/intmgetl.f
79 73
80 74
81#### Target ###### 75#### Target ######
@@ -86,11 +80,11 @@ libsciio_la_rootdir = $(mydatadir)
86libsciio_la_root_DATA = changelog.txt license.txt readme.txt version.xml 80libsciio_la_root_DATA = changelog.txt license.txt readme.txt version.xml
87 81
88 82
89####io : init scripts #### 83####io : init scripts ####
90libsciio_la_etcdir = $(mydatadir)/etc 84libsciio_la_etcdir = $(mydatadir)/etc
91libsciio_la_etc_DATA = etc/io.quit etc/io.start 85libsciio_la_etc_DATA = etc/io.quit etc/io.start
92 86
93####io : gateway declaration #### 87####io : gateway declaration ####
94libsciio_la_sci_gatewaydir = $(mydatadir)/sci_gateway 88libsciio_la_sci_gatewaydir = $(mydatadir)/sci_gateway
95libsciio_la_sci_gateway_DATA = sci_gateway/io_gateway.xml 89libsciio_la_sci_gateway_DATA = sci_gateway/io_gateway.xml
96 90
diff --git a/scilab/modules/io/Makefile.in b/scilab/modules/io/Makefile.in
index 5afdefe..5a9a009 100755..100644
--- a/scilab/modules/io/Makefile.in
+++ b/scilab/modules/io/Makefile.in
@@ -108,13 +108,9 @@ am__installdirs = "$(DESTDIR)$(pkglibdir)" \
108 "$(DESTDIR)$(libsciio_la_sci_gatewaydir)" 108 "$(DESTDIR)$(libsciio_la_sci_gatewaydir)"
109LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkglib_LTLIBRARIES) 109LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkglib_LTLIBRARIES)
110libdummy_io_la_LIBADD = 110libdummy_io_la_LIBADD =
111am_libdummy_io_la_OBJECTS = libdummy_io_la-intmgetl.lo 111am_libdummy_io_la_OBJECTS =
112libdummy_io_la_OBJECTS = $(am_libdummy_io_la_OBJECTS) 112libdummy_io_la_OBJECTS = $(am_libdummy_io_la_OBJECTS)
113libdummy_io_la_LINK = $(LIBTOOL) --tag=F77 $(AM_LIBTOOLFLAGS) \ 113libsciio_la_DEPENDENCIES = $(top_builddir)/modules/core/libscicore.la \
114 $(LIBTOOLFLAGS) --mode=link $(F77LD) $(libdummy_io_la_FFLAGS) \
115 $(FFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
116libsciio_la_DEPENDENCIES = libdummy-io.la \
117 $(top_builddir)/modules/core/libscicore.la \
118 $(top_builddir)/modules/arnoldi/libsciarnoldi.la \ 114 $(top_builddir)/modules/arnoldi/libsciarnoldi.la \
119 $(top_builddir)/modules/elementary_functions/libscielementary_functions.la \ 115 $(top_builddir)/modules/elementary_functions/libscielementary_functions.la \
120 $(top_builddir)/modules/tclsci/libscitclsci.la \ 116 $(top_builddir)/modules/tclsci/libscitclsci.la \
@@ -125,17 +121,17 @@ libsciio_la_DEPENDENCIES = libdummy-io.la \
125 $(top_builddir)/modules/output_stream/libscioutput_stream.la 121 $(top_builddir)/modules/output_stream/libscioutput_stream.la
126am__objects_1 = libsciio_la-getpidc.lo libsciio_la-setenvc.lo \ 122am__objects_1 = libsciio_la-getpidc.lo libsciio_la-setenvc.lo \
127 libsciio_la-systemc.lo libsciio_la-getenvc.lo \ 123 libsciio_la-systemc.lo libsciio_la-getenvc.lo \
128 libsciio_la-mgetl.lo libsciio_la-GetenvB.lo 124 libsciio_la-GetenvB.lo
129am__objects_2 = v2unit.lo newsave.lo v2cunit.lo writebuf.lo 125am__objects_2 = v2unit.lo newsave.lo v2cunit.lo writebuf.lo
130am__objects_3 = libsciio_la-sci_read4b.lo libsciio_la-sci_getio.lo \ 126am__objects_3 = libsciio_la-sci_read4b.lo libsciio_la-sci_getio.lo \
131 libsciio_la-sci_readb.lo libsciio_la-sci_host.lo \ 127 libsciio_la-sci_readb.lo libsciio_la-sci_host.lo \
132 libsciio_la-sci_file.lo libsciio_la-sci_rat.lo \ 128 libsciio_la-sci_file.lo libsciio_la-sci_rat.lo \
133 libsciio_la-sci_getenv.lo libsciio_la-sci_write.lo \ 129 libsciio_la-sci_getenv.lo libsciio_la-sci_write.lo \
134 libsciio_la-sci_writeb.lo libsciio_la-sci_setenv.lo \ 130 libsciio_la-sci_writeb.lo libsciio_la-sci_setenv.lo \
135 libsciio_la-gw_io.lo libsciio_la-sci_mgetl.lo \ 131 libsciio_la-gw_io.lo libsciio_la-sci_read.lo \
136 libsciio_la-sci_read.lo libsciio_la-sci_getpid.lo \ 132 libsciio_la-sci_getpid.lo libsciio_la-sci_write4b.lo \
137 libsciio_la-sci_write4b.lo libsciio_la-sci_load.lo \ 133 libsciio_la-sci_load.lo libsciio_la-sci_unix.lo \
138 libsciio_la-sci_unix.lo libsciio_la-sci_save.lo 134 libsciio_la-sci_save.lo
139am__objects_4 = intwrite4b.lo intrat.lo intwritb.lo intwrite.lo \ 135am__objects_4 = intwrite4b.lo intrat.lo intwritb.lo intwrite.lo \
140 intread4b.lo intread.lo intreadb.lo intfile.lo 136 intread4b.lo intread.lo intreadb.lo intfile.lo
141am_libsciio_la_OBJECTS = $(am__objects_1) $(am__objects_2) \ 137am_libsciio_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
@@ -415,7 +411,6 @@ IO_C_SOURCES = src/c/getpidc.c \
415src/c/setenvc.c \ 411src/c/setenvc.c \
416src/c/systemc.c \ 412src/c/systemc.c \
417src/c/getenvc.c \ 413src/c/getenvc.c \
418src/c/mgetl.c \
419src/c/GetenvB.c 414src/c/GetenvB.c
420 415
421IO_FORTRAN_SOURCES = src/fortran/v2unit.f \ 416IO_FORTRAN_SOURCES = src/fortran/v2unit.f \
@@ -434,7 +429,6 @@ sci_gateway/c/sci_write.c \
434sci_gateway/c/sci_writeb.c \ 429sci_gateway/c/sci_writeb.c \
435sci_gateway/c/sci_setenv.c \ 430sci_gateway/c/sci_setenv.c \
436sci_gateway/c/gw_io.c \ 431sci_gateway/c/gw_io.c \
437sci_gateway/c/sci_mgetl.c \
438sci_gateway/c/sci_read.c \ 432sci_gateway/c/sci_read.c \
439sci_gateway/c/sci_getpid.c \ 433sci_gateway/c/sci_getpid.c \
440sci_gateway/c/sci_write4b.c \ 434sci_gateway/c/sci_write4b.c \
@@ -454,7 +448,7 @@ sci_gateway/fortran/intfile.f
454 448
455# Disable optimisation of the file intmgetl.f 449# Disable optimisation of the file intmgetl.f
456noinst_LTLIBRARIES = libdummy-io.la 450noinst_LTLIBRARIES = libdummy-io.la
457libdummy_io_la_SOURCES = sci_gateway/fortran/intmgetl.f 451libdummy_io_la_SOURCES =
458libdummy_io_la_FFLAGS = $(FFLAGS:-O%=) 452libdummy_io_la_FFLAGS = $(FFLAGS:-O%=)
459libsciio_la_CFLAGS = -I$(srcdir)/includes/ \ 453libsciio_la_CFLAGS = -I$(srcdir)/includes/ \
460 -I$(srcdir)/src/c/ \ 454 -I$(srcdir)/src/c/ \
@@ -475,7 +469,7 @@ libsciio_la_SOURCES = $(IO_C_SOURCES) $(IO_FORTRAN_SOURCES) $(GATEWAY_C_SOURCES)
475# For the code check (splint) 469# For the code check (splint)
476CHECK_SRC = $(IO_C_SOURCES) $(GATEWAY_C_SOURCES) 470CHECK_SRC = $(IO_C_SOURCES) $(GATEWAY_C_SOURCES)
477INCLUDE_FLAGS = $(libsciio_la_CFLAGS) 471INCLUDE_FLAGS = $(libsciio_la_CFLAGS)
478libsciio_la_LIBADD = libdummy-io.la $(top_builddir)/modules/core/libscicore.la $(top_builddir)/modules/arnoldi/libsciarnoldi.la $(top_builddir)/modules/elementary_functions/libscielementary_functions.la $(top_builddir)/modules/tclsci/libscitclsci.la $(top_builddir)/modules/fileio/libscifileio.la $(top_builddir)/modules/integer/libsciinteger.la $(top_builddir)/modules/string/libscistring.la $(top_builddir)/libs/MALLOC/libscimalloc.la $(top_builddir)/modules/output_stream/libscioutput_stream.la 472libsciio_la_LIBADD = $(top_builddir)/modules/core/libscicore.la $(top_builddir)/modules/arnoldi/libsciarnoldi.la $(top_builddir)/modules/elementary_functions/libscielementary_functions.la $(top_builddir)/modules/tclsci/libscitclsci.la $(top_builddir)/modules/fileio/libscifileio.la $(top_builddir)/modules/integer/libsciinteger.la $(top_builddir)/modules/string/libscistring.la $(top_builddir)/libs/MALLOC/libscimalloc.la $(top_builddir)/modules/output_stream/libscioutput_stream.la
479 473
480#### Target ###### 474#### Target ######
481modulename = io 475modulename = io
@@ -484,11 +478,11 @@ modulename = io
484libsciio_la_rootdir = $(mydatadir) 478libsciio_la_rootdir = $(mydatadir)
485libsciio_la_root_DATA = changelog.txt license.txt readme.txt version.xml 479libsciio_la_root_DATA = changelog.txt license.txt readme.txt version.xml
486 480
487####io : init scripts #### 481####io : init scripts ####
488libsciio_la_etcdir = $(mydatadir)/etc 482libsciio_la_etcdir = $(mydatadir)/etc
489libsciio_la_etc_DATA = etc/io.quit etc/io.start 483libsciio_la_etc_DATA = etc/io.quit etc/io.start
490 484
491####io : gateway declaration #### 485####io : gateway declaration ####
492libsciio_la_sci_gatewaydir = $(mydatadir)/sci_gateway 486libsciio_la_sci_gatewaydir = $(mydatadir)/sci_gateway
493libsciio_la_sci_gateway_DATA = sci_gateway/io_gateway.xml 487libsciio_la_sci_gateway_DATA = sci_gateway/io_gateway.xml
494 488
@@ -629,7 +623,7 @@ clean-pkglibLTLIBRARIES:
629 rm -f "$${dir}/so_locations"; \ 623 rm -f "$${dir}/so_locations"; \
630 done 624 done
631libdummy-io.la: $(libdummy_io_la_OBJECTS) $(libdummy_io_la_DEPENDENCIES) 625libdummy-io.la: $(libdummy_io_la_OBJECTS) $(libdummy_io_la_DEPENDENCIES)
632 $(libdummy_io_la_LINK) $(libdummy_io_la_OBJECTS) $(libdummy_io_la_LIBADD) $(LIBS) 626 $(LINK) $(libdummy_io_la_OBJECTS) $(libdummy_io_la_LIBADD) $(LIBS)
633libsciio.la: $(libsciio_la_OBJECTS) $(libsciio_la_DEPENDENCIES) 627libsciio.la: $(libsciio_la_OBJECTS) $(libsciio_la_DEPENDENCIES)
634 $(libsciio_la_LINK) -rpath $(pkglibdir) $(libsciio_la_OBJECTS) $(libsciio_la_LIBADD) $(LIBS) 628 $(libsciio_la_LINK) -rpath $(pkglibdir) $(libsciio_la_OBJECTS) $(libsciio_la_LIBADD) $(LIBS)
635 629
@@ -643,14 +637,12 @@ distclean-compile:
643@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciio_la-getenvc.Plo@am__quote@ 637@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciio_la-getenvc.Plo@am__quote@
644@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciio_la-getpidc.Plo@am__quote@ 638@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciio_la-getpidc.Plo@am__quote@
645@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciio_la-gw_io.Plo@am__quote@ 639@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciio_la-gw_io.Plo@am__quote@
646@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciio_la-mgetl.Plo@am__quote@
647@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciio_la-sci_file.Plo@am__quote@ 640@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciio_la-sci_file.Plo@am__quote@
648@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciio_la-sci_getenv.Plo@am__quote@ 641@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciio_la-sci_getenv.Plo@am__quote@
649@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciio_la-sci_getio.Plo@am__quote@ 642@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciio_la-sci_getio.Plo@am__quote@
650@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciio_la-sci_getpid.Plo@am__quote@ 643@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciio_la-sci_getpid.Plo@am__quote@
651@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciio_la-sci_host.Plo@am__quote@ 644@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciio_la-sci_host.Plo@am__quote@
652@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciio_la-sci_load.Plo@am__quote@ 645@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciio_la-sci_load.Plo@am__quote@
653@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciio_la-sci_mgetl.Plo@am__quote@
654@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciio_la-sci_rat.Plo@am__quote@ 646@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciio_la-sci_rat.Plo@am__quote@
655@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciio_la-sci_read.Plo@am__quote@ 647@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciio_la-sci_read.Plo@am__quote@
656@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciio_la-sci_read4b.Plo@am__quote@ 648@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciio_la-sci_read4b.Plo@am__quote@
@@ -713,13 +705,6 @@ libsciio_la-getenvc.lo: src/c/getenvc.c
713@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 705@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
714@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciio_la_CPPFLAGS) $(CPPFLAGS) $(libsciio_la_CFLAGS) $(CFLAGS) -c -o libsciio_la-getenvc.lo `test -f 'src/c/getenvc.c' || echo '$(srcdir)/'`src/c/getenvc.c 706@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciio_la_CPPFLAGS) $(CPPFLAGS) $(libsciio_la_CFLAGS) $(CFLAGS) -c -o libsciio_la-getenvc.lo `test -f 'src/c/getenvc.c' || echo '$(srcdir)/'`src/c/getenvc.c
715 707
716libsciio_la-mgetl.lo: src/c/mgetl.c
717@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciio_la_CPPFLAGS) $(CPPFLAGS) $(libsciio_la_CFLAGS) $(CFLAGS) -MT libsciio_la-mgetl.lo -MD -MP -MF $(DEPDIR)/libsciio_la-mgetl.Tpo -c -o libsciio_la-mgetl.lo `test -f 'src/c/mgetl.c' || echo '$(srcdir)/'`src/c/mgetl.c
718@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsciio_la-mgetl.Tpo $(DEPDIR)/libsciio_la-mgetl.Plo
719@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/c/mgetl.c' object='libsciio_la-mgetl.lo' libtool=yes @AMDEPBACKSLASH@
720@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
721@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciio_la_CPPFLAGS) $(CPPFLAGS) $(libsciio_la_CFLAGS) $(CFLAGS) -c -o libsciio_la-mgetl.lo `test -f 'src/c/mgetl.c' || echo '$(srcdir)/'`src/c/mgetl.c
722
723libsciio_la-GetenvB.lo: src/c/GetenvB.c 708libsciio_la-GetenvB.lo: src/c/GetenvB.c
724@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciio_la_CPPFLAGS) $(CPPFLAGS) $(libsciio_la_CFLAGS) $(CFLAGS) -MT libsciio_la-GetenvB.lo -MD -MP -MF $(DEPDIR)/libsciio_la-GetenvB.Tpo -c -o libsciio_la-GetenvB.lo `test -f 'src/c/GetenvB.c' || echo '$(srcdir)/'`src/c/GetenvB.c 709@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciio_la_CPPFLAGS) $(CPPFLAGS) $(libsciio_la_CFLAGS) $(CFLAGS) -MT libsciio_la-GetenvB.lo -MD -MP -MF $(DEPDIR)/libsciio_la-GetenvB.Tpo -c -o libsciio_la-GetenvB.lo `test -f 'src/c/GetenvB.c' || echo '$(srcdir)/'`src/c/GetenvB.c
725@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsciio_la-GetenvB.Tpo $(DEPDIR)/libsciio_la-GetenvB.Plo 710@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsciio_la-GetenvB.Tpo $(DEPDIR)/libsciio_la-GetenvB.Plo
@@ -804,13 +789,6 @@ libsciio_la-gw_io.lo: sci_gateway/c/gw_io.c
804@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 789@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
805@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciio_la_CPPFLAGS) $(CPPFLAGS) $(libsciio_la_CFLAGS) $(CFLAGS) -c -o libsciio_la-gw_io.lo `test -f 'sci_gateway/c/gw_io.c' || echo '$(srcdir)/'`sci_gateway/c/gw_io.c 790@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciio_la_CPPFLAGS) $(CPPFLAGS) $(libsciio_la_CFLAGS) $(CFLAGS) -c -o libsciio_la-gw_io.lo `test -f 'sci_gateway/c/gw_io.c' || echo '$(srcdir)/'`sci_gateway/c/gw_io.c
806 791
807libsciio_la-sci_mgetl.lo: sci_gateway/c/sci_mgetl.c
808@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciio_la_CPPFLAGS) $(CPPFLAGS) $(libsciio_la_CFLAGS) $(CFLAGS) -MT libsciio_la-sci_mgetl.lo -MD -MP -MF $(DEPDIR)/libsciio_la-sci_mgetl.Tpo -c -o libsciio_la-sci_mgetl.lo `test -f 'sci_gateway/c/sci_mgetl.c' || echo '$(srcdir)/'`sci_gateway/c/sci_mgetl.c
809@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsciio_la-sci_mgetl.Tpo $(DEPDIR)/libsciio_la-sci_mgetl.Plo
810@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sci_gateway/c/sci_mgetl.c' object='libsciio_la-sci_mgetl.lo' libtool=yes @AMDEPBACKSLASH@
811@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
812@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciio_la_CPPFLAGS) $(CPPFLAGS) $(libsciio_la_CFLAGS) $(CFLAGS) -c -o libsciio_la-sci_mgetl.lo `test -f 'sci_gateway/c/sci_mgetl.c' || echo '$(srcdir)/'`sci_gateway/c/sci_mgetl.c
813
814libsciio_la-sci_read.lo: sci_gateway/c/sci_read.c 792libsciio_la-sci_read.lo: sci_gateway/c/sci_read.c
815@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciio_la_CPPFLAGS) $(CPPFLAGS) $(libsciio_la_CFLAGS) $(CFLAGS) -MT libsciio_la-sci_read.lo -MD -MP -MF $(DEPDIR)/libsciio_la-sci_read.Tpo -c -o libsciio_la-sci_read.lo `test -f 'sci_gateway/c/sci_read.c' || echo '$(srcdir)/'`sci_gateway/c/sci_read.c 793@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciio_la_CPPFLAGS) $(CPPFLAGS) $(libsciio_la_CFLAGS) $(CFLAGS) -MT libsciio_la-sci_read.lo -MD -MP -MF $(DEPDIR)/libsciio_la-sci_read.Tpo -c -o libsciio_la-sci_read.lo `test -f 'sci_gateway/c/sci_read.c' || echo '$(srcdir)/'`sci_gateway/c/sci_read.c
816@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsciio_la-sci_read.Tpo $(DEPDIR)/libsciio_la-sci_read.Plo 794@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsciio_la-sci_read.Tpo $(DEPDIR)/libsciio_la-sci_read.Plo
@@ -1180,9 +1158,6 @@ uninstall-am: uninstall-libsciio_la_etcDATA \
1180 uninstall-pkglibLTLIBRARIES 1158 uninstall-pkglibLTLIBRARIES
1181 1159
1182 1160
1183libdummy_io_la-intmgetl.lo: sci_gateway/fortran/intmgetl.f
1184 $(LIBTOOL) --tag=F77 --mode=compile $(F77) $(libdummy_io_la_FFLAGS) -c -o libdummy_io_la-intmgetl.lo `test -f 'sci_gateway/fortran/intmgetl.f' || echo '$(srcdir)/'`sci_gateway/fortran/intmgetl.f
1185
1186# This target enables tests for Scilab 1161# This target enables tests for Scilab
1187check-local: $(top_builddir)/scilab-bin 1162check-local: $(top_builddir)/scilab-bin
1188 @COMMAND="test_run('$(modulename)');quit";\ 1163 @COMMAND="test_run('$(modulename)');quit";\
diff --git a/scilab/modules/io/includes/gw_io.h b/scilab/modules/io/includes/gw_io.h
index b3e5f81..0adbc5f 100644
--- a/scilab/modules/io/includes/gw_io.h
+++ b/scilab/modules/io/includes/gw_io.h
@@ -34,7 +34,6 @@ IO_IMPEXP int C2F(sci_read4b)(char *fname,unsigned long fname_len);
34IO_IMPEXP int C2F(sci_write4b)(char *fname,unsigned long fname_len); 34IO_IMPEXP int C2F(sci_write4b)(char *fname,unsigned long fname_len);
35IO_IMPEXP int C2F(sci_save)(char *fname,unsigned long fname_len); 35IO_IMPEXP int C2F(sci_save)(char *fname,unsigned long fname_len);
36IO_IMPEXP int C2F(sci_load)(char *fname,unsigned long fname_len); 36IO_IMPEXP int C2F(sci_load)(char *fname,unsigned long fname_len);
37IO_IMPEXP int C2F(sci_mgetl)(char *fname,unsigned long fname_len);
38IO_IMPEXP int C2F(sci_getio)(char *fname,unsigned long fname_len); 37IO_IMPEXP int C2F(sci_getio)(char *fname,unsigned long fname_len);
39IO_IMPEXP int C2F(sci_setenv)(char *fname,unsigned long fname_len); 38IO_IMPEXP int C2F(sci_setenv)(char *fname,unsigned long fname_len);
40 39
@@ -42,7 +41,6 @@ IO_IMPEXP int C2F(intgetenv)(char *fname,unsigned long fname_len);
42IO_IMPEXP int C2F(intload) (int *id1, int *k1); /* FORTRAN subroutine */ 41IO_IMPEXP int C2F(intload) (int *id1, int *k1); /* FORTRAN subroutine */
43IO_IMPEXP int C2F(intsave)(void); 42IO_IMPEXP int C2F(intsave)(void);
44IO_IMPEXP int C2F(intfile)(void); 43IO_IMPEXP int C2F(intfile)(void);
45IO_IMPEXP int C2F(intmgetl)(void);
46IO_IMPEXP int C2F(intrat)(void); 44IO_IMPEXP int C2F(intrat)(void);
47IO_IMPEXP int C2F(intread)(void); 45IO_IMPEXP int C2F(intread)(void);
48IO_IMPEXP int C2F(intread4b)(void); 46IO_IMPEXP int C2F(intread4b)(void);
diff --git a/scilab/modules/io/sci_gateway/c/gw_io.c b/scilab/modules/io/sci_gateway/c/gw_io.c
index a3b6188..6c979b9 100644
--- a/scilab/modules/io/sci_gateway/c/gw_io.c
+++ b/scilab/modules/io/sci_gateway/c/gw_io.c
@@ -23,7 +23,7 @@ static gw_generic_table Tab[] =
23{C2F(sci_getenv),"getenv"}, 23{C2F(sci_getenv),"getenv"},
24{C2F(sci_getio),"getio"}, 24{C2F(sci_getio),"getio"},
25{NULL,""}, 25{NULL,""},
26{C2F(sci_mgetl),"mgetl"}, 26{NULL,""},
27{C2F(sci_write),"write"}, 27{C2F(sci_write),"write"},
28{C2F(sci_rat),"rat"}, 28{C2F(sci_rat),"rat"},
29{C2F(sci_file),"file"}, 29{C2F(sci_file),"file"},
diff --git a/scilab/modules/io/sci_gateway/c/sci_mgetl.c b/scilab/modules/io/sci_gateway/c/sci_mgetl.c
deleted file mode 100644
index 1548018..0000000
--- a/scilab/modules/io/sci_gateway/c/sci_mgetl.c
+++ /dev/null
@@ -1,271 +0,0 @@
1/*
2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2006 - INRIA - Allan CORNET
4 * Copyright (C) 2010 - DIGITEO - Allan CORNET
5 *
6 * This file must be used under the terms of the CeCILL.
7 * This source file is licensed as described in the file COPYING, which
8 * you should have received as part of this distribution. The terms
9 * are also available at
10 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11 *
12 */
13/*--------------------------------------------------------------------------*/
14#include "gw_io.h"
15#include "stack-c.h"
16#include "localization.h"
17#include "Scierror.h"
18#include "api_scilab.h"
19#include "mgetl.h"
20#include "mopen.h"
21#include "mclose.h"
22#include "expandPathVariable.h"
23#include "filesmanagement.h"
24#include "freeArrayOfString.h"
25#include "BOOL.h"
26/*--------------------------------------------------------------------------*/
27int C2F(sci_mgetl)(char *fname,unsigned long fname_len)
28{
29 SciErr sciErr;
30 int *piAddressVarOne = NULL;
31 int numberOfLinesToRead = -1;
32
33 Rhs = Max(0,Rhs);
34
35 CheckRhs(1,2);
36 CheckLhs(1,1);
37
38 if (Rhs == 2)
39 {
40 int *piAddressVarTwo = NULL;
41
42 sciErr = getVarAddressFromPosition(pvApiCtx, 2, &piAddressVarTwo);
43 if(sciErr.iErr)
44 {
45 printError(&sciErr, 0);
46 return 0;
47 }
48
49 if ( isDoubleType(pvApiCtx, piAddressVarTwo) )
50 {
51 double dValue = 0.;
52 if (!isScalar(pvApiCtx, piAddressVarTwo))
53 {
54 Scierror(999,_("%s: Wrong size for input argument #%d: Integer expected.\n"), fname, 2);
55 return 0;
56 }
57
58 if ( getScalarDouble(pvApiCtx, piAddressVarTwo, &dValue) == 0)
59 {
60 numberOfLinesToRead = (int)dValue;
61 }
62 else
63 {
64 Scierror(999,_("%s: Memory allocation error.\n"), fname);
65 return 0;
66 }
67 }
68 else
69 {
70 Scierror(999,_("%s: Wrong type for input argument #%d: Integer expected.\n"), fname, 2);
71 return 0;
72 }
73 }
74
75 sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddressVarOne);
76 if(sciErr.iErr)
77 {
78 printError(&sciErr, 0);
79 return 0;
80 }
81
82 if ( isStringType(pvApiCtx, piAddressVarOne) || isDoubleType(pvApiCtx, piAddressVarOne) )
83 {
84 char **wcReadedStrings = NULL;
85 int numberOfLinesReaded = 0;
86 int fileDescriptor = -1;
87 int iErrorMgetl = 0;
88 BOOL bCloseFile = FALSE;
89
90 if (!isScalar(pvApiCtx, piAddressVarOne))
91 {
92 Scierror(999,_("%s: Wrong size for input argument #%d: String or logical unit expected.\n"), fname, 1);
93 return 0;
94 }
95
96 if (isStringType(pvApiCtx, piAddressVarOne))
97 {
98 char *fileName = NULL;
99 if (getAllocatedSingleString(pvApiCtx, piAddressVarOne, &fileName) == 0)
100 {
101 char *expandedFileName = expandPathVariable(fileName);
102 freeAllocatedSingleString(fileName);
103 fileName = NULL;
104
105 if (IsAlreadyOpenedInScilab(expandedFileName))
106 {
107 int fd = GetIdFromFilename(expandedFileName);
108 fileDescriptor = fd;
109 if (expandedFileName) {FREE(expandedFileName); expandedFileName = NULL;}
110 bCloseFile = FALSE;
111 }
112 else
113 {
114 #define READ_ONLY_TEXT_MODE "rt"
115 int fd = 0;
116 int f_swap = 0;
117 double res = 0.0;
118 int ierr = 0;
119
120 C2F(mopen)(&fd, expandedFileName, READ_ONLY_TEXT_MODE, &f_swap, &res, &ierr);
121 bCloseFile = TRUE;
122
123 switch (ierr)
124 {
125 case MOPEN_NO_ERROR:
126 fileDescriptor = fd;
127 break;
128 case MOPEN_NO_MORE_LOGICAL_UNIT:
129 {
130 Scierror(66, _("%s: Too many files opened!\n"), fname);
131 if (expandedFileName) {FREE(expandedFileName); expandedFileName = NULL;}
132 return 0;
133 }
134 break;
135 case MOPEN_CAN_NOT_OPEN_FILE:
136 {
137 Scierror(999, _("%s: Cannot open file %s.\n"), fname, expandedFileName);
138 if (expandedFileName) {FREE(expandedFileName); expandedFileName = NULL;}
139 return 0;
140 }
141 break;
142 case MOPEN_NO_MORE_MEMORY:
143 {
144 if (expandedFileName) {FREE(expandedFileName); expandedFileName = NULL;}
145 Scierror(999, _("%s: No more memory.\n"), fname);
146 return 0;
147 }
148 break;
149 case MOPEN_INVALID_FILENAME:
150 {
151 Scierror(999, _("%s: invalid filename %s.\n"), fname, expandedFileName);
152 if (expandedFileName) {FREE(expandedFileName); expandedFileName = NULL;}
153 return 0;
154 }
155 break;
156 case MOPEN_INVALID_STATUS: default:
157 {
158 if (expandedFileName) {FREE(expandedFileName); expandedFileName = NULL;}
159 Scierror(999, _("%s: invalid status.\n"), fname);
160 return 0;
161 }
162 break;
163 }
164 }
165 }
166 else
167 {
168 Scierror(999,_("%s: Memory allocation error.\n"), fname);
169 return 0;
170 }
171 }
172 else /* double */
173 {
174 double dValue = 0.;
175
176 if ( !getScalarDouble(pvApiCtx, piAddressVarOne, &dValue) )
177 {
178 fileDescriptor = (int)dValue;
179 }
180 else
181 {
182 Scierror(999,_("%s: Memory allocation error.\n"), fname);
183 return 0;
184 }
185 }
186
187 wcReadedStrings = mgetl(fileDescriptor, numberOfLinesToRead, &numberOfLinesReaded, &iErrorMgetl);
188
189 if (bCloseFile)
190 {
191 double dErrClose = 0.;
192 C2F(mclose)(&fileDescriptor, &dErrClose);
193 bCloseFile = FALSE;
194 }
195
196 switch(iErrorMgetl)
197 {
198 case MGETL_NO_ERROR:
199 {
200 if (numberOfLinesReaded == 0)
201 {
202 if (createEmptyMatrix(pvApiCtx, Rhs + 1) != 0)
203 {
204 Scierror(999,_("%s: Memory allocation error.\n"), fname);
205 return 0;
206 }
207 }
208 else
209 {
210 int m = numberOfLinesReaded;
211 int n = 1;
212
213 sciErr = createMatrixOfString(pvApiCtx, Rhs + 1, m, n, wcReadedStrings);
214 if(sciErr.iErr)
215 {
216 printError(&sciErr, 0);
217 return 0;
218 }
219 }
220
221 freeArrayOfString(wcReadedStrings, numberOfLinesReaded);
222 wcReadedStrings = NULL;
223 }
224 break;
225
226 case MGETL_EOF:
227 {
228 if (createEmptyMatrix(pvApiCtx, Rhs + 1) != 0)
229 {
230 Scierror(999,_("%s: Memory allocation error.\n"), fname);
231 return 0;
232 }
233 }
234 break;
235
236 case MGETL_MEMORY_ALLOCATION_ERROR:
237 {
238 if (wcReadedStrings)
239 {
240 freeArrayOfString(wcReadedStrings, numberOfLinesReaded);
241 wcReadedStrings = NULL;
242 }
243 Scierror(999,_("%s: Memory allocation error.\n"), fname);
244 return 0;
245 }
246 break;
247
248 case MGETL_ERROR:
249 {
250 if (wcReadedStrings)
251 {
252 freeArrayOfString(wcReadedStrings, numberOfLinesReaded);
253 wcReadedStrings = NULL;
254 }
255 Scierror(999,_("%s: error.\n"), fname);
256 return 0;
257 }
258 break;
259 }
260
261 LhsVar(1) = Rhs + 1;
262 C2F(putlhsvar)();
263 }
264 else
265 {
266 Scierror(999,_("%s: Wrong type for input argument #%d: String or logical unit expected.\n"), fname, 1);
267 }
268
269 return 0;
270}
271/*--------------------------------------------------------------------------*/
diff --git a/scilab/modules/io/sci_gateway/fortran/intmgetl.f b/scilab/modules/io/sci_gateway/fortran/intmgetl.f
deleted file mode 100644
index 5e8b5ec..0000000
--- a/scilab/modules/io/sci_gateway/fortran/intmgetl.f
+++ /dev/null
@@ -1,179 +0,0 @@
1c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2c Copyright (C) INRIA
3c Copyright (C) ENPC
4c
5c This file must be used under the terms of the CeCILL.
6c This source file is licensed as described in the file COPYING, which
7c you should have received as part of this distribution. The terms
8c are also available at
9c http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
10 subroutine intmgetl
11
12 INCLUDE 'stack.h'
13c
14 integer mode(2)
15 integer iadr,sadr
16 logical checkrhs,checklhs,getscalar
17 logical opened
18c
19 iadr(l)=l+l-1
20 sadr(l)=(l/2)+1
21c
22 rhs = max(0,rhs)
23 if(.not.checkrhs('mgetl',1,2)) return
24 if(.not.checklhs('mgetl',1,1)) return
25
26c opening file
27 call v2cunit(top-rhs+1,'rb',lunit,opened,ierr)
28 if(ierr.lt.0) then
29 call error(244)
30 return
31 elseif(ierr.gt.0) then
32 return
33 endif
34c
35 if(rhs.eq.2) then
36 if (.not.getscalar('mgetl',top,top,lr)) return
37 m=stk(lr)
38 top=top-1
39 else
40 m=-1
41 endif
42
43 il=iadr(lstk(top))
44 ili=il+4
45
46
47 if(m.gt.0) then
48c . specified number of lines
49 err=sadr(ili+2)-lstk(bot)
50 if(err.gt.0) then
51 call error(17)
52 return
53 endif
54 li=ili+m+1
55 istk(ili)=1
56 mr=m
57 do i=1,m
58 mnt=0
59 09 call readnextline(lunit,buf,bsiz,mn,nr,info)
60 if(info.eq.-1) then
61 mr=i-1
62 goto 10
63c err=i
64c call error(62)
65c if(.not.opened) call clunit(-lunit,buf,mode)
66c return
67 endif
68
69 mn=max(0,mn-1)
70 err=sadr(li+mn)-lstk(bot)
71 if(err.gt.0) then
72 call error(17)
73 return
74 endif
75 call cvstr(mn,istk(li),buf(1:mn),0)
76 li=li+mn
77 mnt=mnt+mn
78 if(info.eq.2) then
79c . buffer too small for this line
80 goto 09
81 endif
82 ili=ili+1
83 istk(ili)=istk(ili-1)+mnt
84 enddo
85 10 continue
86 if(mr.eq.0) then
87 istk(il)=1
88 istk(il+1)=0
89 istk(il+2)=0
90 istk(il+3)=0
91 lstk(top+1)=sadr(il+4)
92 else
93 istk(il)=10
94 istk(il+1)=mr
95 istk(il+2)=1
96 if(mr.lt.m) then
97 nc=istk(il+4+mr)-1
98 call icopy(nc,istk(il+4+m+1),1,istk(il+4+mr+1),1)
99 li=il+4+mr+nc+1
100c +1 added ... see bug 2610 (Thx Bruno Pincon)
101 endif
102 lstk(top+1)=sadr(li)
103 endif
104 elseif(m.eq.0) then
105 istk(il)=1
106 istk(il+1)=0
107 istk(il+2)=0
108 istk(il+3)=0
109 lstk(top+1)=sadr(il+4)
110 else
111c . unspecified number of lines
112 li=ili
113 i=-1
114 12 i=i+1
115
116 mnt=0
117 lic=li+1
118 13 call readnextline(lunit,buf,bsiz,mn,nr,info)
119 if(info.eq.-1) goto 20
120
121 mn=max(0,mn-1)
122 if(mn.gt.0) then
123 err=sadr(lic+mn+1)-lstk(bot)
124 if(err.gt.0) then
125 call error(17)
126 goto 996
127 endif
128 call cvstr(mn,istk(lic),buf(1:mn),0)
129 lic=lic+mn
130 endif
131 mnt=mnt+mn
132 if(info.eq.2) then
133c . buffer too small for this line
134 goto 13
135 endif
136 istk(li)=mnt
137 li=li+mnt+1
138
139 if(info.eq.-1) then
140 if(mnt.gt.0) i=i+1
141 goto 20
142 endif
143 goto 12
144
145 20 m=i
146 if(m.le.0) then
147 istk(il)=1
148 istk(il+1)=0
149 istk(il+2)=0
150 istk(il+3)=0
151 lstk(top+1)=sadr(il+4)
152 else
153 err=sadr(li+2+li-ili+1)-lstk(bot)
154 if(err.gt.0) then
155 call error(17)
156 goto 996
157 endif
158 call icopy(li-ili+1,istk(ili),-1,istk(li+2),-1)
159 lis=li+2
160 istk(il)=10
161 istk(il+1)=m
162 istk(il+2)=1
163 istk(ili)=1
164 li=ili+m+1
165 do 30 j=1,m
166 mn=istk(lis)
167 istk(ili+1)=istk(ili)+mn
168 call icopy(mn,istk(lis+1),1,istk(li),1)
169 lis=lis+mn+1
170 li=li+mn
171 ili=ili+1
172 30 continue
173 lstk(top+1)=sadr(li+1)
174 endif
175 endif
176
177 996 if(.not.opened) call clunit(-lunit,buf,mode)
178 return
179 end
diff --git a/scilab/modules/io/sci_gateway/io_gateway.xml b/scilab/modules/io/sci_gateway/io_gateway.xml
index 9843eff..fd6b1ab 100644
--- a/scilab/modules/io/sci_gateway/io_gateway.xml
+++ b/scilab/modules/io/sci_gateway/io_gateway.xml
@@ -40,7 +40,7 @@
40<PRIMITIVE gatewayId="5" primitiveId="3" primitiveName="getenv" /> 40<PRIMITIVE gatewayId="5" primitiveId="3" primitiveName="getenv" />
41<PRIMITIVE gatewayId="5" primitiveId="4" primitiveName="getio" /> 41<PRIMITIVE gatewayId="5" primitiveId="4" primitiveName="getio" />
42<!-- <PRIMITIVE gatewayId="5" primitiveId="5" primitiveName="diary" /> --> 42<!-- <PRIMITIVE gatewayId="5" primitiveId="5" primitiveName="diary" /> -->
43<PRIMITIVE gatewayId="5" primitiveId="6" primitiveName="mgetl" /> 43<!-- <PRIMITIVE gatewayId="5" primitiveId="6" primitiveName="mgetl" /> -->
44<PRIMITIVE gatewayId="5" primitiveId="7" primitiveName="write" /> 44<PRIMITIVE gatewayId="5" primitiveId="7" primitiveName="write" />
45<PRIMITIVE gatewayId="5" primitiveId="8" primitiveName="rat" /> 45<PRIMITIVE gatewayId="5" primitiveId="8" primitiveName="rat" />
46<PRIMITIVE gatewayId="5" primitiveId="9" primitiveName="file" /> 46<PRIMITIVE gatewayId="5" primitiveId="9" primitiveName="file" />
diff --git a/scilab/modules/io/src/c/io.vcproj b/scilab/modules/io/src/c/io.vcproj
index 3d9893a..1909650 100644
--- a/scilab/modules/io/src/c/io.vcproj
+++ b/scilab/modules/io/src/c/io.vcproj
@@ -392,10 +392,6 @@
392 > 392 >
393 </File> 393 </File>
394 <File 394 <File
395 RelativePath=".\mgetl.c"
396 >
397 </File>
398 <File
399 RelativePath="..\..\sci_gateway\c\sci_file.c" 395 RelativePath="..\..\sci_gateway\c\sci_file.c"
400 > 396 >
401 </File> 397 </File>
@@ -420,10 +416,6 @@
420 > 416 >
421 </File> 417 </File>
422 <File 418 <File
423 RelativePath="..\..\sci_gateway\c\sci_mgetl.c"
424 >
425 </File>
426 <File
427 RelativePath="..\..\sci_gateway\c\sci_rat.c" 419 RelativePath="..\..\sci_gateway\c\sci_rat.c"
428 > 420 >
429 </File> 421 </File>
@@ -497,10 +489,6 @@
497 > 489 >
498 </File> 490 </File>
499 <File 491 <File
500 RelativePath=".\mgetl.h"
501 >
502 </File>
503 <File
504 RelativePath=".\resource.h" 492 RelativePath=".\resource.h"
505 > 493 >
506 </File> 494 </File>
diff --git a/scilab/modules/io/src/c/mgetl.c b/scilab/modules/io/src/c/mgetl.c
deleted file mode 100644
index ba6e4f1..0000000
--- a/scilab/modules/io/src/c/mgetl.c
+++ /dev/null
@@ -1,152 +0,0 @@
1/*
2* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3* Copyright (C) 2010 - DIGITEO - Allan CORNET
4*
5* This file must be used under the terms of the CeCILL.
6* This source file is licensed as described in the file COPYING, which
7* you should have received as part of this distribution. The terms
8* are also available at
9* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
10*
11*/
12/*--------------------------------------------------------------------------*/
13#include "mgetl.h"
14#include "filesmanagement.h"
15#include "mopen.h"
16#include "MALLOC.h"
17#include "BOOL.h"
18/*--------------------------------------------------------------------------*/
19#define LINE_MAX 4096
20#define CR 13
21#define LF 10
22#define EMPTYSTR ""
23/*--------------------------------------------------------------------------*/
24char **mgetl(int fd, int nbLinesIn, int *nbLinesOut, int *ierr)
25{
26 char **wcLines = NULL;
27 FILE *fa = NULL;
28
29 *ierr = MGETL_ERROR;
30 *nbLinesOut = 0;
31
32 fa = GetFileOpenedInScilab(fd);
33
34 if (fa)
35 {
36 char Line[LINE_MAX * 2];
37 int nbLines = 0;
38
39 if (nbLinesIn < 0)
40 {
41 wcLines = (char **)MALLOC(sizeof(char *));
42 if (wcLines == NULL)
43 {
44 *nbLinesOut = 0;
45 *ierr = MGETL_MEMORY_ALLOCATION_ERROR;
46 return NULL;
47 }
48
49 while ( fgets ( Line, sizeof(Line), fa ) != NULL )
50 {
51 int wcLen = (int)strlen(Line);
52 nbLines++;
53 wcLines = (char **)REALLOC(wcLines, nbLines * sizeof(char *));
54 if (wcLines == NULL)
55 {
56 *nbLinesOut = 0;
57 *ierr = MGETL_MEMORY_ALLOCATION_ERROR;
58 return NULL;
59 }
60
61 wcLines[nbLines - 1] = (char*)MALLOC(sizeof(char) * (wcLen + 1));
62 if (wcLines[nbLines - 1] == NULL)
63 {
64 *nbLinesOut = 0;
65 *ierr = MGETL_MEMORY_ALLOCATION_ERROR;
66 return NULL;
67 }
68
69 if (wcLen >= 1)
70 {
71 /* remove EOL */
72 if ( (Line[wcLen - 1] == CR) || (Line[wcLen - 1] == LF) )
73 {
74 Line[wcLen - 1] = 0;
75 }
76 }
77
78 strcpy(wcLines[nbLines - 1], Line);
79 strcpy(Line, EMPTYSTR);
80 }
81 *nbLinesOut = nbLines;
82 *ierr = MGETL_NO_ERROR;
83 }
84 else
85 {
86 if (nbLinesIn == 0)
87 {
88 *ierr = MGETL_EOF;
89 *nbLinesOut = 0;
90 if (wcLines)
91 {
92 FREE(wcLines);
93 }
94 wcLines = NULL;
95 }
96 else
97 {
98 BOOL bContinue = TRUE;
99 wcLines = (char **)MALLOC(sizeof(char *) * nbLinesIn);
100 if (wcLines == NULL)
101 {
102 *nbLinesOut = 0;
103 *ierr = MGETL_MEMORY_ALLOCATION_ERROR;
104 return NULL;
105 }
106
107 do
108 {
109 if (nbLines < nbLinesIn)
110 {
111 if ( fgets ( Line, sizeof(Line), fa ) != NULL)
112 {
113 int wcLen = (int)strlen(Line);
114 if (wcLen >= 1)
115 {
116 /* remove EOL */
117 if ( (Line[wcLen - 1] == CR) || (Line[wcLen - 1] == LF) )
118 {
119 Line[wcLen - 1] = 0;
120 }
121 }
122 nbLines++;
123 wcLines[nbLines - 1] = (char*)MALLOC(sizeof(char) * (wcLen + 1));
124 if (wcLines[nbLines - 1] == NULL)
125 {
126 *nbLinesOut = 0;
127 *ierr = MGETL_MEMORY_ALLOCATION_ERROR;
128 return NULL;
129 }
130 strcpy(wcLines[nbLines - 1], Line);
131
132 strcpy(Line, EMPTYSTR);
133 }
134 else
135 {
136 bContinue = FALSE;
137 }
138 }
139 else
140 {
141 bContinue = FALSE;
142 }
143 } while (bContinue);
144
145 *nbLinesOut = nbLines;
146 *ierr = MGETL_NO_ERROR;
147 }
148 }
149 }
150 return wcLines;
151}
152/*--------------------------------------------------------------------------*/
diff --git a/scilab/modules/io/src/c/mgetl.h b/scilab/modules/io/src/c/mgetl.h
deleted file mode 100644
index e3ee367..0000000
--- a/scilab/modules/io/src/c/mgetl.h
+++ /dev/null
@@ -1,44 +0,0 @@
1/*
2* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3* Copyright (C) 2010 - DIGITEO - Allan CORNET
4*
5* This file must be used under the terms of the CeCILL.
6* This source file is licensed as described in the file COPYING, which
7* you should have received as part of this distribution. The terms
8* are also available at
9* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
10*
11*/
12/*--------------------------------------------------------------------------*/
13#ifndef __MGETL_H__
14#define __MGETL_H__
15
16#include "charEncoding.h"
17
18typedef enum {
19 MGETL_NO_ERROR = 0,
20 MGETL_EOF = 1,
21 MGETL_MEMORY_ALLOCATION_ERROR = 2,
22 MGETL_ERROR = 3
23} mgetlError;
24
25/**
26 * @fn wchar_t ** mgetl(int fd, int nbLinesIn, int *nbLinesOut, int *ierr) #endif
27 *
28 * @brief Mgetls.
29 *
30 * @author Allan Cornet
31 * @date 4/16/2010
32 *
33 * @param fd The file descriptor id.
34 * @param nbLinesIn The nb lines in .
35 * @param [in,out] nbLinesOut If non-null, the nb lines out.
36 * @param [in,out] ierr If non-null, the ierr.
37 *
38 * @return null if it fails, else strings readed.
39**/
40char ** mgetl(int fd, int nbLinesIn, int *nbLinesOut, int *ierr);
41
42
43#endif /* __MGETL_H__ */
44/*--------------------------------------------------------------------------*/
diff --git a/scilab/modules/io/src/fortran/io_f.vfproj b/scilab/modules/io/src/fortran/io_f.vfproj
index 15baf90..db2b7b9 100644
--- a/scilab/modules/io/src/fortran/io_f.vfproj
+++ b/scilab/modules/io/src/fortran/io_f.vfproj
@@ -85,7 +85,6 @@ lib /DEF:&quot;$(InputDir)output_stream_f_Import.def&quot; /SUBSYSTEM:WINDOWS /M
85 <File RelativePath=".\io_f.rc"/></Filter> 85 <File RelativePath=".\io_f.rc"/></Filter>
86 <Filter Name="Source Files" Filter="f90;for;f;fpp;ftn;def;odl;idl"> 86 <Filter Name="Source Files" Filter="f90;for;f;fpp;ftn;def;odl;idl">
87 <File RelativePath="..\..\sci_gateway\fortran\intfile.f"/> 87 <File RelativePath="..\..\sci_gateway\fortran\intfile.f"/>
88 <File RelativePath="..\..\sci_gateway\fortran\intmgetl.f"/>
89 <File RelativePath="..\..\sci_gateway\fortran\intrat.f"/> 88 <File RelativePath="..\..\sci_gateway\fortran\intrat.f"/>
90 <File RelativePath="..\..\sci_gateway\fortran\intread.f"/> 89 <File RelativePath="..\..\sci_gateway\fortran\intread.f"/>
91 <File RelativePath="..\..\sci_gateway\fortran\intread4b.f"/> 90 <File RelativePath="..\..\sci_gateway\fortran\intread4b.f"/>
diff --git a/scilab/modules/io/src/fortran/io_f2c.vcproj b/scilab/modules/io/src/fortran/io_f2c.vcproj
index f6c5a2c..d39bbac 100644
--- a/scilab/modules/io/src/fortran/io_f2c.vcproj
+++ b/scilab/modules/io/src/fortran/io_f2c.vcproj
@@ -1,4 +1,4 @@
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="Windows-1252"?>
2<VisualStudioProject 2<VisualStudioProject
3 ProjectType="Visual C++" 3 ProjectType="Visual C++"
4 Version="9,00" 4 Version="9,00"
@@ -6,6 +6,7 @@
6 ProjectGUID="{C2EDD447-BB60-41A1-973B-8213FCA9ECD4}" 6 ProjectGUID="{C2EDD447-BB60-41A1-973B-8213FCA9ECD4}"
7 RootNamespace="io_f2c" 7 RootNamespace="io_f2c"
8 Keyword="Win32Proj" 8 Keyword="Win32Proj"
9 TargetFrameworkVersion="0"
9 > 10 >
10 <Platforms> 11 <Platforms>
11 <Platform 12 <Platform
@@ -402,10 +403,6 @@
402 > 403 >
403 </File> 404 </File>
404 <File 405 <File
405 RelativePath="..\..\sci_gateway\fortran\intmgetl.c"
406 >
407 </File>
408 <File
409 RelativePath="..\..\sci_gateway\fortran\intrat.c" 406 RelativePath="..\..\sci_gateway\fortran\intrat.c"
410 > 407 >
411 </File> 408 </File>
@@ -502,10 +499,6 @@
502 > 499 >
503 </File> 500 </File>
504 <File 501 <File
505 RelativePath="..\..\sci_gateway\fortran\intmgetl.f"
506 >
507 </File>
508 <File
509 RelativePath="..\..\sci_gateway\fortran\intrat.f" 502 RelativePath="..\..\sci_gateway\fortran\intrat.f"
510 > 503 >
511 </File> 504 </File>
diff --git a/scilab/modules/io/tests/nonreg_tests/bug_2059.dia.ref b/scilab/modules/io/tests/nonreg_tests/bug_2059.dia.ref
deleted file mode 100644
index 7627625..0000000
--- a/scilab/modules/io/tests/nonreg_tests/bug_2059.dia.ref
+++ /dev/null
@@ -1,12 +0,0 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2008 - INRIA
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7// test bug 2059
8fd = mopen(SCI+'/modules/io/tests/nonreg_tests/bug_2059.txt','rt');
9ierr = execstr("dataReadFromFile = mgetl(fd,100)","errcatch");
10if ierr <> 0 then bugmes();quit;end
11close(fd);
12if size(dataReadFromFile,'*') <> 4 then bugmes();quit;end
diff --git a/scilab/modules/io/tests/nonreg_tests/bug_2059.tst b/scilab/modules/io/tests/nonreg_tests/bug_2059.tst
deleted file mode 100644
index f789191..0000000
--- a/scilab/modules/io/tests/nonreg_tests/bug_2059.tst
+++ /dev/null
@@ -1,17 +0,0 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2008 - INRIA
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7
8// test bug 2059
9
10fd = mopen(SCI+'/modules/io/tests/nonreg_tests/bug_2059.txt','rt');
11
12ierr = execstr("dataReadFromFile = mgetl(fd,100)","errcatch");
13if ierr <> 0 then pause,end
14
15close(fd);
16
17if size(dataReadFromFile,'*') <> 4 then pause,end
diff --git a/scilab/modules/io/tests/nonreg_tests/bug_2059.txt b/scilab/modules/io/tests/nonreg_tests/bug_2059.txt
deleted file mode 100644
index f221f72..0000000
--- a/scilab/modules/io/tests/nonreg_tests/bug_2059.txt
+++ /dev/null
@@ -1,4 +0,0 @@
1======== mgetl.txt
2Line 1
3Line 2
4======== END OF mgetl.txt
diff --git a/scilab/modules/io/tests/nonreg_tests/bug_2610.dia.ref b/scilab/modules/io/tests/nonreg_tests/bug_2610.dia.ref
deleted file mode 100644
index ea29d53..0000000
--- a/scilab/modules/io/tests/nonreg_tests/bug_2610.dia.ref
+++ /dev/null
@@ -1,11 +0,0 @@
1// test bug 2610
2write('foo.txt',rand(500,3))
3fd=mopen('foo.txt');
4A=mgetl(fd,300);
5if size(A)<>[300,1] then bugmes();quit;end
6A=mgetl(fd,300);
7if size(A)<>[200,1] then bugmes();quit;end
8A=mgetl(fd,300);
9if size(A)<>[0,0] then bugmes();quit;end
10mclose(fd);
11mdelete('foo.txt')
diff --git a/scilab/modules/io/tests/nonreg_tests/bug_2610.tst b/scilab/modules/io/tests/nonreg_tests/bug_2610.tst
deleted file mode 100644
index 251d764..0000000
--- a/scilab/modules/io/tests/nonreg_tests/bug_2610.tst
+++ /dev/null
@@ -1,21 +0,0 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) ????-2008 - INRIA
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7
8// test bug 2610
9
10write('foo.txt',rand(500,3))
11fd=mopen('foo.txt');
12A=mgetl(fd,300);
13if size(A)<>[300,1] then pause, end
14
15A=mgetl(fd,300);
16if size(A)<>[200,1] then pause, end
17
18A=mgetl(fd,300);
19if size(A)<>[0,0] then pause, end
20mclose(fd);
21mdelete('foo.txt')
diff --git a/scilab/modules/io/tests/nonreg_tests/bug_3427.dia.ref b/scilab/modules/io/tests/nonreg_tests/bug_3427.dia.ref
deleted file mode 100644
index 27accc9..0000000
--- a/scilab/modules/io/tests/nonreg_tests/bug_3427.dia.ref
+++ /dev/null
@@ -1,28 +0,0 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2008 - DIGITEO - Allan CORNET
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7// <-- Non-regression test for bug 3427 -->
8//
9// <-- Short Description -->
10//-->mgetl(TMPDIR+"/"+myFile,'r')
11//mgetl: Wrong type for argument 2: Real or complex matrix expected.
12//=> Wrong error report.
13//The second input argument should be an integer scalar.
14//Nothing else.
15//
16// <-- Bugzilla URL -->
17// http://bugzilla.scilab.org/show_bug.cgi?id=3427
18//
19ierr = execstr('mgetl(''SCI/etc/scilab.start'',''r'');','errcatch');
20if ierr <> 999 then bugmes();quit;end
21err_msg = lasterror();
22ref_msg = msprintf(gettext("%s: Wrong type for input argument #%d: An int scalar expected.\n"),'mgetl',2);
23if err_msg <> ref_msg then bugmes();quit;end
24ierr = execstr('mgetl(''SCI/etc/scilab.start'',[5 5]);','errcatch');
25if ierr <> 999 then bugmes();quit;end
26err_msg = lasterror();
27ref_msg = msprintf(gettext("%s: Wrong type for input argument #%d: An int scalar expected.\n"),'mgetl',2);
28if err_msg <> ref_msg then bugmes();quit;end
diff --git a/scilab/modules/io/tests/nonreg_tests/bug_3427.tst b/scilab/modules/io/tests/nonreg_tests/bug_3427.tst
deleted file mode 100644
index f4a40de..0000000
--- a/scilab/modules/io/tests/nonreg_tests/bug_3427.tst
+++ /dev/null
@@ -1,33 +0,0 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2008 - DIGITEO - Allan CORNET
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7
8// <-- Non-regression test for bug 3427 -->
9//
10// <-- Short Description -->
11//-->mgetl(TMPDIR+"/"+myFile,'r')
12//mgetl: Wrong type for argument 2: Real or complex matrix expected.
13//=> Wrong error report.
14//The second input argument should be an integer scalar.
15//Nothing else.
16//
17// <-- Bugzilla URL -->
18// http://bugzilla.scilab.org/show_bug.cgi?id=3427
19//
20
21ierr = execstr('mgetl(''SCI/etc/scilab.start'',''r'');','errcatch');
22if ierr <> 999 then pause,end
23err_msg = lasterror();
24ref_msg = msprintf(gettext("%s: Wrong type for input argument #%d: An int scalar expected.\n"),'mgetl',2);
25
26if err_msg <> ref_msg then pause,end
27
28ierr = execstr('mgetl(''SCI/etc/scilab.start'',[5 5]);','errcatch');
29if ierr <> 999 then pause,end
30err_msg = lasterror();
31ref_msg = msprintf(gettext("%s: Wrong type for input argument #%d: An int scalar expected.\n"),'mgetl',2);
32
33if err_msg <> ref_msg then pause,end
diff --git a/scilab/modules/io/tests/nonreg_tests/bug_3478.dia.ref b/scilab/modules/io/tests/nonreg_tests/bug_3478.dia.ref
index dde456d..1f5338b 100644
--- a/scilab/modules/io/tests/nonreg_tests/bug_3478.dia.ref
+++ b/scilab/modules/io/tests/nonreg_tests/bug_3478.dia.ref
@@ -13,4 +13,4 @@
13// http://bugzilla.scilab.org/show_bug.cgi?id=3478 13// http://bugzilla.scilab.org/show_bug.cgi?id=3478
14// 14//
15ierr = execstr("file(''open'', ''my file which does not exist'', ''old'');", "errcatch"); 15ierr = execstr("file(''open'', ''my file which does not exist'', ''old'');", "errcatch");
16if ierr <> 999 then bugmes();quit;end 16if ierr <> 240 then bugmes();quit;end
diff --git a/scilab/modules/io/tests/nonreg_tests/bug_3478.tst b/scilab/modules/io/tests/nonreg_tests/bug_3478.tst
index 805c779..532d4b1 100644
--- a/scilab/modules/io/tests/nonreg_tests/bug_3478.tst
+++ b/scilab/modules/io/tests/nonreg_tests/bug_3478.tst
@@ -16,4 +16,4 @@
16// 16//
17 17
18ierr = execstr("file(''open'', ''my file which does not exist'', ''old'');", "errcatch"); 18ierr = execstr("file(''open'', ''my file which does not exist'', ''old'');", "errcatch");
19if ierr <> 999 then pause,end 19if ierr <> 240 then pause,end