mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* io.c (rb_getc, rb_io_fread, rb_io_fwrite, rb_read_pending):
remove deprecated functions which do not work. [ruby-dev:36697] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0f4ea5f3e3
commit
ca9589aeb0
3 changed files with 5 additions and 49 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Fri Oct 17 00:16:08 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||||
|
|
||||||
|
* io.c (rb_getc, rb_io_fread, rb_io_fwrite, rb_read_pending):
|
||||||
|
remove deprecated functions which do not work. [ruby-dev:36697]
|
||||||
|
|
||||||
Thu Oct 16 23:48:34 2008 Tanaka Akira <akr@fsij.org>
|
Thu Oct 16 23:48:34 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* common.mk (TESTS): removed to re-enable test for minitest.
|
* common.mk (TESTS): removed to re-enable test for minitest.
|
||||||
|
|
|
@ -162,11 +162,6 @@ void rb_io_read_check(rb_io_t*);
|
||||||
int rb_io_read_pending(rb_io_t*);
|
int rb_io_read_pending(rb_io_t*);
|
||||||
void rb_read_check(FILE*);
|
void rb_read_check(FILE*);
|
||||||
|
|
||||||
DEPRECATED(int rb_getc(FILE*));
|
|
||||||
DEPRECATED(long rb_io_fread(char *, long, FILE *));
|
|
||||||
DEPRECATED(long rb_io_fwrite(const char *, long, FILE *));
|
|
||||||
DEPRECATED(int rb_read_pending(FILE*));
|
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
#if 0
|
#if 0
|
||||||
{ /* satisfy cc-mode */
|
{ /* satisfy cc-mode */
|
||||||
|
|
44
io.c
44
io.c
|
@ -403,12 +403,6 @@ rb_io_check_writable(rb_io_t *fptr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
rb_read_pending(FILE *fp)
|
|
||||||
{
|
|
||||||
return STDIO_READ_DATA_PENDING(fp);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
rb_io_read_pending(rb_io_t *fptr)
|
rb_io_read_pending(rb_io_t *fptr)
|
||||||
{
|
{
|
||||||
|
@ -846,18 +840,6 @@ io_fwrite(VALUE str, rb_io_t *fptr, int nosync)
|
||||||
return io_binwrite(str, fptr, nosync);
|
return io_binwrite(str, fptr, nosync);
|
||||||
}
|
}
|
||||||
|
|
||||||
long
|
|
||||||
rb_io_fwrite(const char *ptr, long len, FILE *f)
|
|
||||||
{
|
|
||||||
rb_io_t of;
|
|
||||||
|
|
||||||
of.fd = fileno(f);
|
|
||||||
of.stdio_file = f;
|
|
||||||
of.mode = FMODE_WRITABLE;
|
|
||||||
of.pathv = Qnil;
|
|
||||||
return io_fwrite(rb_str_new(ptr, len), &of, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
io_write(VALUE io, VALUE str, int nosync)
|
io_write(VALUE io, VALUE str, int nosync)
|
||||||
{
|
{
|
||||||
|
@ -1408,22 +1390,6 @@ io_fread(VALUE str, long offset, rb_io_t *fptr)
|
||||||
return len - n;
|
return len - n;
|
||||||
}
|
}
|
||||||
|
|
||||||
long
|
|
||||||
rb_io_fread(char *ptr, long len, FILE *f)
|
|
||||||
{
|
|
||||||
rb_io_t of;
|
|
||||||
VALUE str;
|
|
||||||
long n;
|
|
||||||
|
|
||||||
of.fd = fileno(f);
|
|
||||||
of.stdio_file = f;
|
|
||||||
of.mode = FMODE_READABLE;
|
|
||||||
str = rb_str_new(ptr, len);
|
|
||||||
n = io_fread(str, 0, &of);
|
|
||||||
MEMCPY(ptr, RSTRING_PTR(str), char, n);
|
|
||||||
return n;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define SMALLBUF 100
|
#define SMALLBUF 100
|
||||||
|
|
||||||
static long
|
static long
|
||||||
|
@ -2705,16 +2671,6 @@ rb_io_getc(VALUE io)
|
||||||
READ_CHECK(fptr);
|
READ_CHECK(fptr);
|
||||||
return io_getc(fptr, enc);
|
return io_getc(fptr, enc);
|
||||||
}
|
}
|
||||||
int
|
|
||||||
rb_getc(FILE *f)
|
|
||||||
{
|
|
||||||
int c;
|
|
||||||
|
|
||||||
rb_read_check(f);
|
|
||||||
c = getc(f);
|
|
||||||
|
|
||||||
return c;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue