Changeset: 11bdf75a2573 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=11bdf75a2573
Modified Files:
        clients/Tests/MAL-signatures.stable.out
        clients/Tests/MAL-signatures.stable.out.int128
        clients/Tests/exports.stable.out
        common/stream/ChangeLog
        common/stream/stream.c
        common/stream/stream.h
        monetdb5/ChangeLog
        monetdb5/modules/atoms/streams.c
        monetdb5/modules/atoms/streams.h
        monetdb5/modules/atoms/streams.mal
Branch: default
Log Message:

Removed functions mnstr_rstream and mnstr_wstream and their MAL interfaces.


diffs (186 lines):

diff --git a/clients/Tests/MAL-signatures.stable.out 
b/clients/Tests/MAL-signatures.stable.out
--- a/clients/Tests/MAL-signatures.stable.out
+++ b/clients/Tests/MAL-signatures.stable.out
@@ -8543,10 +8543,8 @@ Ready.
 [ "streams",   "close",        "command streams.close(s:streams):void ",       
"mnstr_close_streamwrap;",      "close and destroy the stream s"        ]
 [ "streams",   "flush",        "command streams.flush(s:streams):void ",       
"mnstr_flush_streamwrap;",      "flush the stream"      ]
 [ "streams",   "openRead",     "command streams.openRead(filename:str):streams 
",      "mnstr_open_rastreamwrap;",     "open ascii file stream for reading"    
]
-[ "streams",   "openRead",     "command streams.openRead(s:streams):streams ", 
"mnstr_stream_rstreamwrap;",    "convert an ascii stream to binary"     ]
 [ "streams",   "openReadBytes",        "command 
streams.openReadBytes(filename:str):streams ", "mnstr_open_rstreamwrap;",      
"open a file stream for reading"        ]
 [ "streams",   "openWrite",    "command 
streams.openWrite(filename:str):streams ",     "mnstr_open_wastreamwrap;",     
"open ascii file stream for writing"    ]
-[ "streams",   "openWrite",    "command streams.openWrite(s:streams):streams 
",        "mnstr_stream_wstreamwrap;",    "convert an ascii stream to binary"   
  ]
 [ "streams",   "openWriteBytes",       "command 
streams.openWriteBytes(filename:str):streams ",        
"mnstr_open_wstreamwrap;",      "open a file stream for writing"        ]
 [ "streams",   "readInt",      "command streams.readInt(s:streams):int ",      
"mnstr_readIntwrap;",   "read integer data from the stream"     ]
 [ "streams",   "readStr",      "command streams.readStr(s:streams):str ",      
"mnstr_read_stringwrap;",       "read string data from the stream"      ]
diff --git a/clients/Tests/MAL-signatures.stable.out.int128 
b/clients/Tests/MAL-signatures.stable.out.int128
--- a/clients/Tests/MAL-signatures.stable.out.int128
+++ b/clients/Tests/MAL-signatures.stable.out.int128
@@ -10907,10 +10907,8 @@ Ready.
 [ "streams",   "close",        "command streams.close(s:streams):void ",       
"mnstr_close_streamwrap;",      "close and destroy the stream s"        ]
 [ "streams",   "flush",        "command streams.flush(s:streams):void ",       
"mnstr_flush_streamwrap;",      "flush the stream"      ]
 [ "streams",   "openRead",     "command streams.openRead(filename:str):streams 
",      "mnstr_open_rastreamwrap;",     "open ascii file stream for reading"    
]
-[ "streams",   "openRead",     "command streams.openRead(s:streams):streams ", 
"mnstr_stream_rstreamwrap;",    "convert an ascii stream to binary"     ]
 [ "streams",   "openReadBytes",        "command 
streams.openReadBytes(filename:str):streams ", "mnstr_open_rstreamwrap;",      
"open a file stream for reading"        ]
 [ "streams",   "openWrite",    "command 
streams.openWrite(filename:str):streams ",     "mnstr_open_wastreamwrap;",     
"open ascii file stream for writing"    ]
-[ "streams",   "openWrite",    "command streams.openWrite(s:streams):streams 
",        "mnstr_stream_wstreamwrap;",    "convert an ascii stream to binary"   
  ]
 [ "streams",   "openWriteBytes",       "command 
streams.openWriteBytes(filename:str):streams ",        
"mnstr_open_wstreamwrap;",      "open a file stream for writing"        ]
 [ "streams",   "readInt",      "command streams.readInt(s:streams):int ",      
"mnstr_readIntwrap;",   "read integer data from the stream"     ]
 [ "streams",   "readStr",      "command streams.readStr(s:streams):str ",      
"mnstr_read_stringwrap;",       "read string data from the stream"      ]
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -2325,8 +2325,6 @@ str mnstr_socket_rastreamwrap(Stream *S,
 str mnstr_socket_rstreamwrap(Stream *S, int *socket, str *name);
 str mnstr_socket_wastreamwrap(Stream *S, int *socket, str *name);
 str mnstr_socket_wstreamwrap(Stream *S, int *socket, str *name);
-str mnstr_stream_rstreamwrap(Stream *sout, Stream *sin);
-str mnstr_stream_wstreamwrap(Stream *sout, Stream *sin);
 int mnstr_writeInt_wrap(Stream *S, int *data);
 str mnstr_writeIntwrap(void *ret, Stream *S, int *data);
 int mnstr_write_string(Stream *S, str data);
@@ -2665,7 +2663,6 @@ int mnstr_readShtArray(stream *s, short 
 int mnstr_readStr(stream *s, char *val);
 ssize_t mnstr_read_block(stream *s, void *buf, size_t elmsize, size_t cnt);
 ssize_t mnstr_readline(stream *s, void *buf, size_t maxcnt);
-stream *mnstr_rstream(stream *s);
 void mnstr_set_byteorder(stream *s, char bigendian);
 void mnstr_settimeout(stream *s, unsigned int ms, int( *func)(void));
 int mnstr_type(stream *s);
@@ -2684,7 +2681,6 @@ int mnstr_writeLngArray(stream *s, const
 int mnstr_writeSht(stream *s, short val);
 int mnstr_writeShtArray(stream *s, const short *val, size_t cnt);
 int mnstr_writeStr(stream *s, const char *val);
-stream *mnstr_wstream(stream *s);
 stream *open_rastream(const char *filename);
 stream *open_rstream(const char *filename);
 stream *open_urlstream(const char *url);
diff --git a/common/stream/ChangeLog b/common/stream/ChangeLog
--- a/common/stream/ChangeLog
+++ b/common/stream/ChangeLog
@@ -1,3 +1,6 @@
 # ChangeLog file for stream
 # This file is updated with Maddlog
 
+* Mon Aug  7 2017 Sjoerd Mullender <sjo...@acm.org>
+- Removed functions mnstr_rstream and mnstr_wstream.
+
diff --git a/common/stream/stream.c b/common/stream/stream.c
--- a/common/stream/stream.c
+++ b/common/stream/stream.c
@@ -618,36 +618,6 @@ close_stream(stream *s)
        }
 }
 
-stream *
-mnstr_rstream(stream *s)
-{
-       if (s == NULL)
-               return NULL;
-#ifdef STREAM_DEBUG
-       fprintf(stderr, "mnstr_rstream %s\n", s->name ? s->name : "<unnamed>");
-#endif
-       assert(s->access == ST_READ);
-       s->type = ST_BIN;
-       if (s->errnr == MNSTR_NO__ERROR)
-               s->read(s, (void *) &s->byteorder, sizeof(s->byteorder), 1);
-       return s;
-}
-
-stream *
-mnstr_wstream(stream *s)
-{
-       if (s == NULL)
-               return NULL;
-#ifdef STREAM_DEBUG
-       fprintf(stderr, "mnstr_wstream %s\n", s->name ? s->name : "<unnamed>");
-#endif
-       assert(s->access == ST_WRITE);
-       s->type = ST_BIN;
-       if (s->errnr == MNSTR_NO__ERROR)
-               s->write(s, (void *) &s->byteorder, sizeof(s->byteorder), 1);
-       return s;
-}
-
 #define EXT_LEN 4
 static const char *
 get_extention(const char *file)
diff --git a/common/stream/stream.h b/common/stream/stream.h
--- a/common/stream/stream.h
+++ b/common/stream/stream.h
@@ -156,8 +156,6 @@ stream_export void mnstr_clearerr(stream
 stream_export int mnstr_type(stream *s);
 stream_export int mnstr_byteorder(stream *s);
 stream_export void mnstr_set_byteorder(stream *s, char bigendian);
-stream_export stream *mnstr_rstream(stream *s);
-stream_export stream *mnstr_wstream(stream *s);
 stream_export void mnstr_settimeout(stream *s, unsigned int ms, int 
(*func)(void));
 stream_export int mnstr_isalive(stream *s);
 
diff --git a/monetdb5/ChangeLog b/monetdb5/ChangeLog
--- a/monetdb5/ChangeLog
+++ b/monetdb5/ChangeLog
@@ -1,6 +1,10 @@
 # ChangeLog file for MonetDB5
 # This file is updated with Maddlog
 
+* Mon Aug  7 2017 Sjoerd Mullender <sjo...@acm.org>
+- Removed MAL functions streams.openRead(s:streams):streams and
+  streams.openWrite(s:streams):streams.
+
 * Tue Aug  1 2017 Sjoerd Mullender <sjo...@acm.org>
 - Lots of changes to streamline the internal error handling.
   In principle, all errors should now include a SQLSTATE error code
diff --git a/monetdb5/modules/atoms/streams.c b/monetdb5/modules/atoms/streams.c
--- a/monetdb5/modules/atoms/streams.c
+++ b/monetdb5/modules/atoms/streams.c
@@ -87,20 +87,6 @@ str mnstr_open_wastreamwrap(Stream *S, s
 }
 
 str
-mnstr_stream_rstreamwrap(Stream *sout, Stream *sin)
-{
-       *(stream**)sout = mnstr_rstream(*(stream**)sin);
-       return MAL_SUCCEED;
-}
-
-str
-mnstr_stream_wstreamwrap(Stream *sout, Stream *sin)
-{
-       *(stream**)sout = mnstr_wstream(*(stream**)sin);
-       return MAL_SUCCEED;
-}
-
-str
 mnstr_socket_rstreamwrap(Stream *S, int *socket, str *name)
 {
        stream *s;
diff --git a/monetdb5/modules/atoms/streams.h b/monetdb5/modules/atoms/streams.h
--- a/monetdb5/modules/atoms/streams.h
+++ b/monetdb5/modules/atoms/streams.h
@@ -42,9 +42,6 @@ mal_export str mnstr_open_wstreamwrap(St
 mal_export str mnstr_open_rastreamwrap(Stream *S, str *filename);
 mal_export str mnstr_open_wastreamwrap(Stream *S, str *filename);
 
-mal_export str mnstr_stream_rstreamwrap(Stream *sout, Stream *sin);
-mal_export str mnstr_stream_wstreamwrap(Stream *sout, Stream *sin);
-
 mal_export str mnstr_socket_rstreamwrap(Stream *S, int *socket, str *name);
 mal_export str mnstr_socket_wstreamwrap(Stream *S, int *socket, str *name);
 mal_export str mnstr_socket_rastreamwrap(Stream *S, int *socket, str *name);
diff --git a/monetdb5/modules/atoms/streams.mal 
b/monetdb5/modules/atoms/streams.mal
--- a/monetdb5/modules/atoms/streams.mal
+++ b/monetdb5/modules/atoms/streams.mal
@@ -22,13 +22,6 @@ unsafe command openWrite( filename:str )
 address mnstr_open_wastreamwrap
 comment "open ascii file stream for writing";
 
-unsafe command openRead(s:streams):streams
-address mnstr_stream_rstreamwrap
-comment "convert an ascii stream to binary";
-unsafe command openWrite(s:streams):streams
-address mnstr_stream_wstreamwrap
-comment "convert an ascii stream to binary";
-
 unsafe command socketReadBytes(skt:int,name:str):streams
 address mnstr_socket_rstreamwrap
 comment "open a socket stream for reading";
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to