mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
20000105
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7ada9b8b5a
commit
76f0202393
26 changed files with 191 additions and 182 deletions
63
ChangeLog
63
ChangeLog
|
@ -1,3 +1,66 @@
|
||||||
|
Wed Jan 5 02:14:46 2000 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
|
||||||
|
|
||||||
|
* parse.y: Fix SEGV on empty parens with UMINUS or UPLUS.
|
||||||
|
|
||||||
|
Tue Jan 4 22:25:54 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
|
||||||
|
|
||||||
|
* parse.y (stmt): `() while cond' dumped core.
|
||||||
|
|
||||||
|
Mon Dec 27 12:35:47 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
|
||||||
|
|
||||||
|
* ext/socket/socket.c (sock_finalize): mswin32: fix socket handle leak.
|
||||||
|
|
||||||
|
* win32/win32.c (myfdclose): ditto.
|
||||||
|
|
||||||
|
Sun Dec 26 23:15:13 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
|
||||||
|
|
||||||
|
* win32/win32.c (mypopen): raise catchable error instead of rb_fatal.
|
||||||
|
* win32/win32.c (mypclose): fix process handle laek.
|
||||||
|
|
||||||
|
Sun Dec 26 16:17:11 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
|
||||||
|
|
||||||
|
* ext/Win32API/Win32API.c (Win32API_initialize): use UINT2NUM
|
||||||
|
instead of INT2NUM to set __dll__ and __proc__.
|
||||||
|
|
||||||
|
Sat Dec 25 00:08:59 1999 KANEKO Naoshi <wbs01621@mail.wbs.ne.jp>
|
||||||
|
|
||||||
|
* ext/Win32API/Win32API.c (Win32API_Call): remove 'dword ptr'
|
||||||
|
from _asm.
|
||||||
|
|
||||||
|
Fri Dec 24 10:26:47 1999 Koji Oda <oda@bsd1.qnes.nec.co.jp>
|
||||||
|
|
||||||
|
* win32/win32.h: use "C++" linkage.
|
||||||
|
|
||||||
|
Fri Dec 24 02:00:57 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
|
||||||
|
|
||||||
|
* eval.c (THREAD_ALLOC): should initialize th->trace.
|
||||||
|
|
||||||
|
Fri Dec 24 00:43:39 1999 KANEKO Naoshi <wbs01621@mail.wbs.ne.jp>
|
||||||
|
|
||||||
|
* io.c (pipe_open): check for `fptr->f == NULL'.
|
||||||
|
* win32/win32.c (mypopen): STDERR does not work during ` function.
|
||||||
|
|
||||||
|
Tue Dec 21 17:21:28 1999 Koji Oda <oda@bsd1.qnes.nec.co.jp>
|
||||||
|
|
||||||
|
* ext/socket/socket.c (sock_finalize): mswin32: fix FILE* leak.
|
||||||
|
|
||||||
|
Sun Dec 19 22:56:31 1999 KANEKO Naoshi <wbs01621@mail.wbs.ne.jp>
|
||||||
|
|
||||||
|
* lib/find.rb: support dosish root directory.
|
||||||
|
* win32/Makefile: ditto.
|
||||||
|
* win32/config.status: ditto.
|
||||||
|
* win32/win32.c (opendir): ditto.
|
||||||
|
* win32/win32.c (opendir): use CharPrev() to get last character
|
||||||
|
of the directory name.
|
||||||
|
|
||||||
|
Fri Dec 17 19:27:43 1999 IWAMURO Motonori <iwa@mmp.fujitsu.co.jp>
|
||||||
|
|
||||||
|
* eval.c (rb_load): should initialize ruby_frame->last_class.
|
||||||
|
|
||||||
|
Wed Dec 15 01:35:29 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
|
||||||
|
|
||||||
|
* ruby.c (proc_options): argv boundary check for `-X'.
|
||||||
|
|
||||||
Sat Dec 11 03:34:38 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
|
Sat Dec 11 03:34:38 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
|
||||||
|
|
||||||
* gc.c (mark_hashentry): key should be VALUE, not ID.
|
* gc.c (mark_hashentry): key should be VALUE, not ID.
|
||||||
|
|
12
bignum.c
12
bignum.c
|
@ -16,9 +16,9 @@ VALUE rb_cBignum;
|
||||||
typedef unsigned short USHORT;
|
typedef unsigned short USHORT;
|
||||||
|
|
||||||
#define BDIGITS(x) RBIGNUM(x)->digits
|
#define BDIGITS(x) RBIGNUM(x)->digits
|
||||||
#define BITSPERDIG (sizeof(short)*CHAR_BIT)
|
#define BITSPERDIG (sizeof(USHORT)*CHAR_BIT)
|
||||||
#define BIGRAD (1L << BITSPERDIG)
|
#define BIGRAD (1L << BITSPERDIG)
|
||||||
#define DIGSPERINT ((unsigned int)(sizeof(long)/sizeof(short)))
|
#define DIGSPERLONG ((unsigned int)(sizeof(long)/sizeof(USHORT)))
|
||||||
#define BIGUP(x) ((unsigned long)(x) << BITSPERDIG)
|
#define BIGUP(x) ((unsigned long)(x) << BITSPERDIG)
|
||||||
#define BIGDN(x) RSHIFT(x,BITSPERDIG)
|
#define BIGDN(x) RSHIFT(x,BITSPERDIG)
|
||||||
#define BIGLO(x) ((USHORT)((x) & (BIGRAD-1)))
|
#define BIGLO(x) ((USHORT)((x) & (BIGRAD-1)))
|
||||||
|
@ -33,7 +33,7 @@ bignew_1(klass, len, sign)
|
||||||
OBJSETUP(big, klass, T_BIGNUM);
|
OBJSETUP(big, klass, T_BIGNUM);
|
||||||
big->sign = sign;
|
big->sign = sign;
|
||||||
big->len = len;
|
big->len = len;
|
||||||
BDIGITS(big) = ALLOC_N(USHORT, len);
|
big->digits = ALLOC_N(USHORT, len);
|
||||||
|
|
||||||
return (VALUE)big;
|
return (VALUE)big;
|
||||||
}
|
}
|
||||||
|
@ -116,14 +116,14 @@ rb_uint2big(n)
|
||||||
VALUE big;
|
VALUE big;
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
big = bignew(DIGSPERINT, 1);
|
big = bignew(DIGSPERLONG, 1);
|
||||||
digits = BDIGITS(big);
|
digits = BDIGITS(big);
|
||||||
while (i < DIGSPERINT) {
|
while (i < DIGSPERLONG) {
|
||||||
digits[i++] = BIGLO(n);
|
digits[i++] = BIGLO(n);
|
||||||
n = BIGDN(n);
|
n = BIGDN(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
i = DIGSPERINT;
|
i = DIGSPERLONG;
|
||||||
while (i-- && !digits[i]) ;
|
while (i-- && !digits[i]) ;
|
||||||
RBIGNUM(big)->len = i+1;
|
RBIGNUM(big)->len = i+1;
|
||||||
return big;
|
return big;
|
||||||
|
|
8
configure
vendored
8
configure
vendored
|
@ -1732,7 +1732,7 @@ case "$host_os" in
|
||||||
nextstep*) ;;
|
nextstep*) ;;
|
||||||
openstep*) ;;
|
openstep*) ;;
|
||||||
rhapsody*) ;;
|
rhapsody*) ;;
|
||||||
human*) ;;
|
human*) ac_cv_func_getpgrp_void=yes;;
|
||||||
beos*) ;;
|
beos*) ;;
|
||||||
cygwin*) ;;
|
cygwin*) ;;
|
||||||
*) LIBS="-lm $LIBS";;
|
*) LIBS="-lm $LIBS";;
|
||||||
|
@ -4361,7 +4361,7 @@ else
|
||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for ac_func in select
|
for ac_func in select gettimeofday
|
||||||
do
|
do
|
||||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||||
echo "configure:4368: checking for $ac_func" >&5
|
echo "configure:4368: checking for $ac_func" >&5
|
||||||
|
@ -4502,7 +4502,7 @@ EOF
|
||||||
|
|
||||||
fi
|
fi
|
||||||
LIBOBJS="$LIBOBJS x68.o"
|
LIBOBJS="$LIBOBJS x68.o"
|
||||||
CFLAGS="$CFLAGS -fansi-only -cc1-stack=196608 -cpp-stack=2694144"
|
CFLAGS="$CFLAGS -fansi-only -cc1-stack=262144 -cpp-stack=2694144"
|
||||||
EXEEXT=.x
|
EXEEXT=.x
|
||||||
OBJEXT=o
|
OBJEXT=o
|
||||||
setup=Setup.x68
|
setup=Setup.x68
|
||||||
|
@ -4573,7 +4573,7 @@ if test "$enable_shared" = 'yes'; then
|
||||||
LIBRUBY_ALIASES='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_INSTALL_NAME).so'
|
LIBRUBY_ALIASES='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_INSTALL_NAME).so'
|
||||||
;;
|
;;
|
||||||
linux*)
|
linux*)
|
||||||
XLDFLAGS='-Wl,-rpath,${prefix}/lib':/usr/lib:/lib
|
LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_INSTALL_NAME).so.$(MAJOR).$(MINOR)'
|
||||||
LIBRUBY_ALIASES='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_INSTALL_NAME).so'
|
LIBRUBY_ALIASES='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_INSTALL_NAME).so'
|
||||||
;;
|
;;
|
||||||
freebsd*)
|
freebsd*)
|
||||||
|
|
|
@ -140,7 +140,7 @@ case "$host_os" in
|
||||||
nextstep*) ;;
|
nextstep*) ;;
|
||||||
openstep*) ;;
|
openstep*) ;;
|
||||||
rhapsody*) ;;
|
rhapsody*) ;;
|
||||||
human*) ;;
|
human*) ac_cv_func_getpgrp_void=yes;;
|
||||||
beos*) ;;
|
beos*) ;;
|
||||||
cygwin*) ;;
|
cygwin*) ;;
|
||||||
*) LIBS="-lm $LIBS";;
|
*) LIBS="-lm $LIBS";;
|
||||||
|
@ -564,7 +564,7 @@ case "$host_os" in
|
||||||
human*)
|
human*)
|
||||||
AC_CHECK_LIB(signal, _harderr)
|
AC_CHECK_LIB(signal, _harderr)
|
||||||
AC_CHECK_LIB(hmem, hmemset)
|
AC_CHECK_LIB(hmem, hmemset)
|
||||||
AC_CHECK_FUNCS(select)
|
AC_CHECK_FUNCS(select gettimeofday)
|
||||||
AC_CACHE_CHECK(whether PD libc _dtos18 fail to convert big number,
|
AC_CACHE_CHECK(whether PD libc _dtos18 fail to convert big number,
|
||||||
rb_cv_missing__dtos18,
|
rb_cv_missing__dtos18,
|
||||||
[AC_TRY_RUN(
|
[AC_TRY_RUN(
|
||||||
|
@ -603,7 +603,7 @@ rb_cv_missing_fconvert=yes, rb_cv_missing_fconvert=no, rb_cv_missing_fconvert=no
|
||||||
AC_DEFINE(MISSING_FCONVERT)
|
AC_DEFINE(MISSING_FCONVERT)
|
||||||
fi
|
fi
|
||||||
LIBOBJS="$LIBOBJS x68.o"
|
LIBOBJS="$LIBOBJS x68.o"
|
||||||
CFLAGS="$CFLAGS -fansi-only -cc1-stack=196608 -cpp-stack=2694144"
|
CFLAGS="$CFLAGS -fansi-only -cc1-stack=262144 -cpp-stack=2694144"
|
||||||
EXEEXT=.x
|
EXEEXT=.x
|
||||||
OBJEXT=o
|
OBJEXT=o
|
||||||
setup=Setup.x68
|
setup=Setup.x68
|
||||||
|
@ -672,7 +672,7 @@ if test "$enable_shared" = 'yes'; then
|
||||||
LIBRUBY_ALIASES='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_INSTALL_NAME).so'
|
LIBRUBY_ALIASES='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_INSTALL_NAME).so'
|
||||||
;;
|
;;
|
||||||
linux*)
|
linux*)
|
||||||
XLDFLAGS='-Wl,-rpath,${prefix}/lib':/usr/lib:/lib
|
LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_INSTALL_NAME).so.$(MAJOR).$(MINOR)'
|
||||||
LIBRUBY_ALIASES='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_INSTALL_NAME).so'
|
LIBRUBY_ALIASES='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_INSTALL_NAME).so'
|
||||||
;;
|
;;
|
||||||
freebsd*)
|
freebsd*)
|
||||||
|
|
|
@ -5,5 +5,5 @@ RUBYCWDLL=rubycw.dll
|
||||||
miniruby$(EXEEXT): $(RUBYCWDLL)
|
miniruby$(EXEEXT): $(RUBYCWDLL)
|
||||||
|
|
||||||
$(RUBYCWDLL): $(OBJS) dmyext.o
|
$(RUBYCWDLL): $(OBJS) dmyext.o
|
||||||
dllwrap -o $(RUBYCWDLL) --export-all --output-lib=$(LIBRUBY_SO) --dllname=$(RUBYCWDLL) -Wl,-e,__cygwin_noncygwin_dll_entry@12 --add-stdcall-alias -s $(OBJS) dmyext.o
|
$(LDSHARED) $(DLDFLAGS) -o $(RUBYCWDLL) --output-lib=$(LIBRUBY_SO) --dllname=$(RUBYCWDLL) -Wl,-e,__cygwin_noncygwin_dll_entry@12 --add-stdcall-alias $(OBJS) dmyext.o
|
||||||
nm --extern-only $(OBJS) dmyext.o | sed -n '/^........ [CD] _\(.*\)$$/s//#define \1 (*__imp_\1)/p' >import.h
|
nm --extern-only $(OBJS) dmyext.o | sed -n '/^........ [CD] _\(.*\)$$/s//#define \1 (*__imp_\1)/p' >import.h
|
||||||
|
|
7
eval.c
7
eval.c
|
@ -4686,6 +4686,7 @@ rb_load(fname, wrap)
|
||||||
}
|
}
|
||||||
PUSH_FRAME();
|
PUSH_FRAME();
|
||||||
ruby_frame->last_func = 0;
|
ruby_frame->last_func = 0;
|
||||||
|
ruby_frame->last_class = 0;
|
||||||
ruby_frame->self = ruby_top_self;
|
ruby_frame->self = ruby_top_self;
|
||||||
ruby_frame->cbase = (VALUE)rb_node_newnode(NODE_CREF,ruby_class,0,0);
|
ruby_frame->cbase = (VALUE)rb_node_newnode(NODE_CREF,ruby_class,0,0);
|
||||||
PUSH_SCOPE();
|
PUSH_SCOPE();
|
||||||
|
@ -6068,7 +6069,6 @@ struct thread {
|
||||||
VALUE klass;
|
VALUE klass;
|
||||||
VALUE wrapper;
|
VALUE wrapper;
|
||||||
|
|
||||||
VALUE trace;
|
|
||||||
int flags; /* misc. states (vmode/rb_trap_immediate/raised) */
|
int flags; /* misc. states (vmode/rb_trap_immediate/raised) */
|
||||||
|
|
||||||
char *file;
|
char *file;
|
||||||
|
@ -6140,7 +6140,6 @@ thread_mark(th)
|
||||||
rb_gc_mark(th->errinfo);
|
rb_gc_mark(th->errinfo);
|
||||||
rb_gc_mark(th->last_line);
|
rb_gc_mark(th->last_line);
|
||||||
rb_gc_mark(th->last_match);
|
rb_gc_mark(th->last_match);
|
||||||
rb_gc_mark(th->trace);
|
|
||||||
rb_mark_tbl(th->locals);
|
rb_mark_tbl(th->locals);
|
||||||
|
|
||||||
/* mark data in copied stack */
|
/* mark data in copied stack */
|
||||||
|
@ -6241,7 +6240,6 @@ rb_thread_save_context(th)
|
||||||
th->last_match = rb_backref_get();
|
th->last_match = rb_backref_get();
|
||||||
th->safe = safe_level;
|
th->safe = safe_level;
|
||||||
|
|
||||||
th->trace = trace_func;
|
|
||||||
th->file = ruby_sourcefile;
|
th->file = ruby_sourcefile;
|
||||||
th->line = ruby_sourceline;
|
th->line = ruby_sourceline;
|
||||||
}
|
}
|
||||||
|
@ -6308,7 +6306,6 @@ rb_thread_restore_context(th, exit)
|
||||||
rb_last_status = th->last_status;
|
rb_last_status = th->last_status;
|
||||||
safe_level = th->safe;
|
safe_level = th->safe;
|
||||||
|
|
||||||
trace_func = th->trace;
|
|
||||||
ruby_sourcefile = th->file;
|
ruby_sourcefile = th->file;
|
||||||
ruby_sourceline = th->line;
|
ruby_sourceline = th->line;
|
||||||
|
|
||||||
|
@ -7548,7 +7545,7 @@ static VALUE
|
||||||
catch_i(tag)
|
catch_i(tag)
|
||||||
ID tag;
|
ID tag;
|
||||||
{
|
{
|
||||||
return rb_f_catch(0, FIX2INT(tag));
|
return rb_funcall(Qnil, rb_intern("catch"), 0, FIX2INT(tag));
|
||||||
}
|
}
|
||||||
|
|
||||||
VALUE
|
VALUE
|
||||||
|
|
|
@ -68,9 +68,9 @@ Win32API_initialize(self, dllname, proc, import, export)
|
||||||
rb_raise(rb_eRuntimeError, "GetProcAddress: %s or %s\n",
|
rb_raise(rb_eRuntimeError, "GetProcAddress: %s or %s\n",
|
||||||
RSTRING(proc)->ptr, RSTRING(str)->ptr);
|
RSTRING(proc)->ptr, RSTRING(str)->ptr);
|
||||||
}
|
}
|
||||||
rb_iv_set(self, "__dll__", INT2NUM((int)hdll));
|
rb_iv_set(self, "__dll__", UINT2NUM((unsigned long)hdll));
|
||||||
rb_iv_set(self, "__dllname__", dllname);
|
rb_iv_set(self, "__dllname__", dllname);
|
||||||
rb_iv_set(self, "__proc__", INT2NUM((int)hproc));
|
rb_iv_set(self, "__proc__", UINT2NUM((unsigned long)hproc));
|
||||||
|
|
||||||
a_import = rb_ary_new();
|
a_import = rb_ary_new();
|
||||||
ptr = RARRAY(import)->ptr;
|
ptr = RARRAY(import)->ptr;
|
||||||
|
@ -165,7 +165,7 @@ Win32API_Call(argc, argv, obj)
|
||||||
mov eax, lParam
|
mov eax, lParam
|
||||||
push eax
|
push eax
|
||||||
}
|
}
|
||||||
#elif defined(__CYGWIN32__) || defined(__MINGW32__)
|
#elif defined(__CYGWIN__) || defined(__MINGW32__)
|
||||||
asm volatile ("pushl %0" :: "g" (lParam));
|
asm volatile ("pushl %0" :: "g" (lParam));
|
||||||
#else
|
#else
|
||||||
#error
|
#error
|
||||||
|
@ -184,10 +184,10 @@ Win32API_Call(argc, argv, obj)
|
||||||
}
|
}
|
||||||
#if defined(_MSC_VER) || defined(__LCC__)
|
#if defined(_MSC_VER) || defined(__LCC__)
|
||||||
_asm {
|
_asm {
|
||||||
mov eax, dword ptr pParam
|
mov eax, pParam
|
||||||
push eax
|
push eax
|
||||||
}
|
}
|
||||||
#elif defined(__CYGWIN32__) || defined(__MINGW32__)
|
#elif defined(__CYGWIN__) || defined(__MINGW32__)
|
||||||
asm volatile ("pushl %0" :: "g" (pParam));
|
asm volatile ("pushl %0" :: "g" (pParam));
|
||||||
#else
|
#else
|
||||||
#error
|
#error
|
||||||
|
@ -195,7 +195,6 @@ Win32API_Call(argc, argv, obj)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (texport) {
|
switch (texport) {
|
||||||
|
|
|
@ -93,16 +93,12 @@ sock_finalize(fptr)
|
||||||
OpenFile *fptr;
|
OpenFile *fptr;
|
||||||
{
|
{
|
||||||
SOCKET s;
|
SOCKET s;
|
||||||
extern int errno;
|
|
||||||
|
|
||||||
if (!fptr->f) return;
|
if (!fptr->f) return;
|
||||||
|
|
||||||
myfdclose(fptr->f);
|
|
||||||
if(fptr->f2) myfdclose(fptr->f);
|
|
||||||
/*
|
|
||||||
s = get_osfhandle(fileno(fptr->f));
|
s = get_osfhandle(fileno(fptr->f));
|
||||||
|
myfdclose(fptr->f);
|
||||||
|
if (fptr->f2) myfdclose(fptr->f2);
|
||||||
closesocket(s);
|
closesocket(s);
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1452,24 +1452,20 @@ module TkTreatFont
|
||||||
alias fontobj font_configinfo
|
alias fontobj font_configinfo
|
||||||
|
|
||||||
def font_configure(slot)
|
def font_configure(slot)
|
||||||
if (fnt = slot['font'])
|
if (fnt = slot.delete('font'))
|
||||||
slot['font'] = nil
|
|
||||||
if fnt.kind_of? TkFont
|
if fnt.kind_of? TkFont
|
||||||
return fnt.call_font_configure(self.path, self.path,'configure',slot)
|
return fnt.call_font_configure(self.path, self.path,'configure',slot)
|
||||||
else
|
else
|
||||||
latinfont_configure(fnt) if fnt
|
latinfont_configure(fnt) if fnt
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if (ltn = slot['latinfont'])
|
if (ltn = slot.delete('latinfont'))
|
||||||
slot['latinfont'] = nil
|
|
||||||
latinfont_configure(ltn) if ltn
|
latinfont_configure(ltn) if ltn
|
||||||
end
|
end
|
||||||
if (ltn = slot['asciifont'])
|
if (ltn = slot.delete('asciifont'))
|
||||||
slot['asciifont'] = nil
|
|
||||||
latinfont_configure(ltn) if ltn
|
latinfont_configure(ltn) if ltn
|
||||||
end
|
end
|
||||||
if (knj = slot['kanjifont'])
|
if (knj = slot.delete('kanjifont'))
|
||||||
slot['kanjifont'] = nil
|
|
||||||
kanjifont_configure(knj) if knj
|
kanjifont_configure(knj) if knj
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1878,42 +1874,24 @@ class TkToplevel<TkWindow
|
||||||
@classname = classname
|
@classname = classname
|
||||||
if keys.kind_of? Hash
|
if keys.kind_of? Hash
|
||||||
keys = keys.dup
|
keys = keys.dup
|
||||||
if keys['classname']
|
@classname = keys.delete('classname')
|
||||||
@classname = keys['classname']
|
@colormap = keys.delete('colormap')
|
||||||
keys['classname'] = nil
|
@container = keys.delete('container')
|
||||||
end
|
@screen = keys.delete('screen')
|
||||||
if keys['colormap']
|
@use = keys.delete('use')
|
||||||
@colormap = keys['colormap']
|
@visual = keys.delete('visual')
|
||||||
keys['colormap'] = nil
|
|
||||||
end
|
|
||||||
if keys['container']
|
|
||||||
@classname = keys['container']
|
|
||||||
keys['classname'] = nil
|
|
||||||
end
|
|
||||||
if keys['screen']
|
|
||||||
@screen = keys['screen']
|
|
||||||
keys['screen'] = nil
|
|
||||||
end
|
|
||||||
if keys['use']
|
|
||||||
@use = keys['use']
|
|
||||||
keys['use'] = nil
|
|
||||||
end
|
|
||||||
if keys['visual']
|
|
||||||
@screen = keys['visual']
|
|
||||||
keys['visual'] = nil
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
super(parent, keys)
|
super(parent, keys)
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_self
|
def create_self
|
||||||
s = []
|
s = []
|
||||||
s.push << "-class" << @classname if @classname
|
s << "-class" << @classname if @classname
|
||||||
s.push << "-colormap" << @colormap if @colormap
|
s << "-colormap" << @colormap if @colormap
|
||||||
s.push << "-container" << @container if @container
|
s << "-container" << @container if @container
|
||||||
s.push << "-screen" << @screen if @screen
|
s << "-screen" << @screen if @screen
|
||||||
s.push << "-use" << @use if @use
|
s << "-use" << @use if @use
|
||||||
s.push << "-visual" << @visual if @visual
|
s << "-visual" << @visual if @visual
|
||||||
tk_call 'toplevel', @path, *s
|
tk_call 'toplevel', @path, *s
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1932,32 +1910,20 @@ class TkFrame<TkWindow
|
||||||
def initialize(parent=nil, keys=nil)
|
def initialize(parent=nil, keys=nil)
|
||||||
if keys.kind_of? Hash
|
if keys.kind_of? Hash
|
||||||
keys = keys.dup
|
keys = keys.dup
|
||||||
if keys['classname']
|
@classname = keys.delete('classname')
|
||||||
@classname = keys['classname']
|
@colormap = keys.delete('colormap')
|
||||||
keys['classname'] = nil
|
@container = keys.delete('container')
|
||||||
end
|
@visual = keys.delete('visual')
|
||||||
if keys['colormap']
|
|
||||||
@colormap = keys['colormap']
|
|
||||||
keys['colormap'] = nil
|
|
||||||
end
|
|
||||||
if keys['container']
|
|
||||||
@classname = keys['container']
|
|
||||||
keys['classname'] = nil
|
|
||||||
end
|
|
||||||
if keys['visual']
|
|
||||||
@screen = keys['visual']
|
|
||||||
keys['visual'] = nil
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
super(parent, keys)
|
super(parent, keys)
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_self
|
def create_self
|
||||||
s = []
|
s = []
|
||||||
s.push << "-class" << @classname if @classname
|
s << "-class" << @classname if @classname
|
||||||
s.push << "-colormap" << @colormap if @colormap
|
s << "-colormap" << @colormap if @colormap
|
||||||
s.push << "-container" << @container if @container
|
s << "-container" << @container if @container
|
||||||
s.push << "-visual" << @visual if @visual
|
s << "-visual" << @visual if @visual
|
||||||
tk_call 'frame', @path, *s
|
tk_call 'frame', @path, *s
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -2189,8 +2155,7 @@ module TkTreatMenuEntryFont
|
||||||
|
|
||||||
def tagfont_configure(index, slot)
|
def tagfont_configure(index, slot)
|
||||||
pathname = self.path + ';' + index
|
pathname = self.path + ';' + index
|
||||||
if (fnt = slot['font'])
|
if (fnt = slot.delete('font'))
|
||||||
slot['font'] = nil
|
|
||||||
if fnt.kind_of? TkFont
|
if fnt.kind_of? TkFont
|
||||||
return fnt.call_font_configure(pathname,
|
return fnt.call_font_configure(pathname,
|
||||||
self.path,'entryconfigure',index,slot)
|
self.path,'entryconfigure',index,slot)
|
||||||
|
@ -2198,16 +2163,13 @@ module TkTreatMenuEntryFont
|
||||||
latintagfont_configure(index, fnt) if fnt
|
latintagfont_configure(index, fnt) if fnt
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if (ltn = slot['latinfont'])
|
if (ltn = slot.delete('latinfont'))
|
||||||
slot['latinfont'] = nil
|
|
||||||
latintagfont_configure(index, ltn) if ltn
|
latintagfont_configure(index, ltn) if ltn
|
||||||
end
|
end
|
||||||
if (ltn = slot['asciifont'])
|
if (ltn = slot.delete('asciifont'))
|
||||||
slot['asciifont'] = nil
|
|
||||||
latintagfont_configure(index, ltn) if ltn
|
latintagfont_configure(index, ltn) if ltn
|
||||||
end
|
end
|
||||||
if (knj = slot['kanjifont'])
|
if (knj = slot.delete('kanjifont'))
|
||||||
slot['kanjifont'] = nil
|
|
||||||
kanjitagfont_configure(index, knj) if knj
|
kanjitagfont_configure(index, knj) if knj
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,7 @@ module TkTreatCItemFont
|
||||||
else
|
else
|
||||||
pathname = self.path + ';' + tagOrId.to_s
|
pathname = self.path + ';' + tagOrId.to_s
|
||||||
end
|
end
|
||||||
if (fnt = slot['font'])
|
if (fnt = slot.delete('font'))
|
||||||
slot['font'] = nil
|
|
||||||
if fnt.kind_of? TkFont
|
if fnt.kind_of? TkFont
|
||||||
return fnt.call_font_configure(pathname,
|
return fnt.call_font_configure(pathname,
|
||||||
self.path,'itemconfigure',tagOrId,slot)
|
self.path,'itemconfigure',tagOrId,slot)
|
||||||
|
@ -39,16 +38,13 @@ module TkTreatCItemFont
|
||||||
latintagfont_configure(tagOrId, fnt) if fnt
|
latintagfont_configure(tagOrId, fnt) if fnt
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if (ltn = slot['latinfont'])
|
if (ltn = slot.delete('latinfont'))
|
||||||
slot['latinfont'] = nil
|
|
||||||
latintagfont_configure(tagOrId, ltn) if ltn
|
latintagfont_configure(tagOrId, ltn) if ltn
|
||||||
end
|
end
|
||||||
if (ltn = slot['asciifont'])
|
if (ltn = slot.delete('asciifont'))
|
||||||
slot['asciifont'] = nil
|
|
||||||
latintagfont_configure(tagOrId, ltn) if ltn
|
latintagfont_configure(tagOrId, ltn) if ltn
|
||||||
end
|
end
|
||||||
if (knj = slot['kanjifont'])
|
if (knj = slot.delete('kanjifont'))
|
||||||
slot['kanjifont'] = nil
|
|
||||||
kanjitagfont_configure(tagOrId, knj) if knj
|
kanjitagfont_configure(tagOrId, knj) if knj
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,7 @@ module TkTreatTextTagFont
|
||||||
else
|
else
|
||||||
pathname = self.path + ';' + tag
|
pathname = self.path + ';' + tag
|
||||||
end
|
end
|
||||||
if (fnt = slot['font'])
|
if (fnt = slot.delete('font'))
|
||||||
slot['font'] = nil
|
|
||||||
if fnt.kind_of? TkFont
|
if fnt.kind_of? TkFont
|
||||||
return fnt.call_font_configure(pathname,
|
return fnt.call_font_configure(pathname,
|
||||||
self.path,'tag','configure',tag,slot)
|
self.path,'tag','configure',tag,slot)
|
||||||
|
@ -37,16 +36,13 @@ module TkTreatTextTagFont
|
||||||
latintagfont_configure(tag, fnt) if fnt
|
latintagfont_configure(tag, fnt) if fnt
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if (ltn = slot['latinfont'])
|
if (ltn = slot.delete('latinfont'))
|
||||||
slot['latinfont'] = nil
|
|
||||||
latintagfont_configure(tag, ltn) if ltn
|
latintagfont_configure(tag, ltn) if ltn
|
||||||
end
|
end
|
||||||
if (ltn = slot['asciifont'])
|
if (ltn = slot.delete('asciifont'))
|
||||||
slot['asciifont'] = nil
|
|
||||||
latintagfont_configure(tag, ltn) if ltn
|
latintagfont_configure(tag, ltn) if ltn
|
||||||
end
|
end
|
||||||
if (knj = slot['kanjifont'])
|
if (knj = slot.delete('kanjifont'))
|
||||||
slot['kanjifont'] = nil
|
|
||||||
kanjitagfont_configure(tag, knj) if knj
|
kanjitagfont_configure(tag, knj) if knj
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
3
gc.c
3
gc.c
|
@ -860,6 +860,9 @@ _rb_setjmp:
|
||||||
movem.l d3-d7/a3-a5,(a0)
|
movem.l d3-d7/a3-a5,(a0)
|
||||||
moveq.l #0,d0
|
moveq.l #0,d0
|
||||||
rts");
|
rts");
|
||||||
|
#ifdef setjmp
|
||||||
|
#undef setjmp
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#if defined(DJGPP)
|
#if defined(DJGPP)
|
||||||
typedef unsigned long rb_jmp_buf[6];
|
typedef unsigned long rb_jmp_buf[6];
|
||||||
|
|
9
hash.c
9
hash.c
|
@ -688,10 +688,9 @@ rb_hash_inspect(hash)
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
hash_to_s(hash)
|
to_s_hash(hash)
|
||||||
VALUE hash;
|
VALUE hash;
|
||||||
{
|
{
|
||||||
if (rb_inspecting_p(hash)) return rb_str_new2("{...}");
|
|
||||||
return rb_ary_to_s(rb_hash_to_a(hash));
|
return rb_ary_to_s(rb_hash_to_a(hash));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -699,8 +698,10 @@ static VALUE
|
||||||
rb_hash_to_s(hash)
|
rb_hash_to_s(hash)
|
||||||
VALUE hash;
|
VALUE hash;
|
||||||
{
|
{
|
||||||
|
VALUE str;
|
||||||
|
|
||||||
if (rb_inspecting_p(hash)) return rb_str_new2("{...}");
|
if (rb_inspecting_p(hash)) return rb_str_new2("{...}");
|
||||||
return rb_protect_inspect(hash_to_s, hash, 0);
|
return rb_protect_inspect(to_s_hash, hash, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
|
@ -1366,7 +1367,7 @@ env_index(dmy, value)
|
||||||
char *s = strchr(*env, '=')+1;
|
char *s = strchr(*env, '=')+1;
|
||||||
if (s) {
|
if (s) {
|
||||||
if (strncmp(s, RSTRING(value)->ptr, strlen(s)) == 0) {
|
if (strncmp(s, RSTRING(value)->ptr, strlen(s)) == 0) {
|
||||||
return rb_tainted_str_new(*env, s-*env);
|
return rb_tainted_str_new(*env, s-*env-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
env++;
|
env++;
|
||||||
|
|
3
io.c
3
io.c
|
@ -1254,6 +1254,9 @@ rb_fopen(fname, mode)
|
||||||
rb_sys_fail(fname);
|
rb_sys_fail(fname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef __human68k__
|
||||||
|
fmode(file, _IOTEXT);
|
||||||
|
#endif
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,9 @@ module Find
|
||||||
begin
|
begin
|
||||||
for f in d
|
for f in d
|
||||||
next if f =~ /^\.\.?$/
|
next if f =~ /^\.\.?$/
|
||||||
if file == "/" then
|
if File::ALT_SEPARATOR and file =~ /^([\/\\]|[A-Za-z]:[\/\\]?)$/ then
|
||||||
|
f = file + f
|
||||||
|
elsif file == "/" then
|
||||||
f = "/" + f
|
f = "/" + f
|
||||||
else
|
else
|
||||||
f = file + "/" + f
|
f = file + "/" + f
|
||||||
|
|
|
@ -243,7 +243,7 @@ SRC
|
||||||
print "no\n"
|
print "no\n"
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
header.tr!("a-z./\055", "A-Z___")
|
header.tr!("a-z\055./", "A-Z___")
|
||||||
$defs.push(format("-DHAVE_%s", header))
|
$defs.push(format("-DHAVE_%s", header))
|
||||||
print "yes\n"
|
print "yes\n"
|
||||||
return true
|
return true
|
||||||
|
@ -367,6 +367,8 @@ CXXFLAGS = $(CFLAGS)
|
||||||
DLDFLAGS = #{$DLDFLAGS} #{$LDFLAGS}
|
DLDFLAGS = #{$DLDFLAGS} #{$LDFLAGS}
|
||||||
LDSHARED = #{CONFIG["LDSHARED"]} #{defflag}
|
LDSHARED = #{CONFIG["LDSHARED"]} #{defflag}
|
||||||
|
|
||||||
|
RUBY_INSTALL_NAME = #{CONFIG["RUBY_INSTALL_NAME"]}
|
||||||
|
|
||||||
prefix = #{CONFIG["prefix"]}
|
prefix = #{CONFIG["prefix"]}
|
||||||
exec_prefix = #{CONFIG["exec_prefix"]}
|
exec_prefix = #{CONFIG["exec_prefix"]}
|
||||||
libdir = #{$libdir}
|
libdir = #{$libdir}
|
||||||
|
|
2
main.c
2
main.c
|
@ -15,7 +15,7 @@ unsigned int _stklen = 0x180000;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __human68k__
|
#ifdef __human68k__
|
||||||
int _stacksize = 131072;
|
int _stacksize = 262144;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__MACOS__) && defined(__MWERKS__)
|
#if defined(__MACOS__) && defined(__MWERKS__)
|
||||||
|
|
|
@ -18,6 +18,7 @@ link(const char *src, const char *dst)
|
||||||
return symlink(src, dst);
|
return symlink(src, dst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef HAVE_GETTIMEOFDAY
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
|
@ -34,3 +35,4 @@ gettimeofday(struct timeval *tv, struct timezone *tz)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
14
parse.y
14
parse.y
|
@ -330,6 +330,7 @@ stmt : block_call
|
||||||
| stmt kWHILE_MOD expr
|
| stmt kWHILE_MOD expr
|
||||||
{
|
{
|
||||||
value_expr($3);
|
value_expr($3);
|
||||||
|
if ($1) {
|
||||||
if (nd_type($1) == NODE_BEGIN) {
|
if (nd_type($1) == NODE_BEGIN) {
|
||||||
$$ = NEW_WHILE(cond($3), $1->nd_body, 0);
|
$$ = NEW_WHILE(cond($3), $1->nd_body, 0);
|
||||||
}
|
}
|
||||||
|
@ -337,9 +338,14 @@ stmt : block_call
|
||||||
$$ = NEW_WHILE(cond($3), $1, 1);
|
$$ = NEW_WHILE(cond($3), $1, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$$ = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
| stmt kUNTIL_MOD expr
|
| stmt kUNTIL_MOD expr
|
||||||
{
|
{
|
||||||
value_expr($3);
|
value_expr($3);
|
||||||
|
if ($1) {
|
||||||
if (nd_type($1) == NODE_BEGIN) {
|
if (nd_type($1) == NODE_BEGIN) {
|
||||||
$$ = NEW_UNTIL(cond($3), $1->nd_body, 0);
|
$$ = NEW_UNTIL(cond($3), $1->nd_body, 0);
|
||||||
}
|
}
|
||||||
|
@ -347,6 +353,10 @@ stmt : block_call
|
||||||
$$ = NEW_UNTIL(cond($3), $1, 1);
|
$$ = NEW_UNTIL(cond($3), $1, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$$ = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
| klBEGIN
|
| klBEGIN
|
||||||
{
|
{
|
||||||
if (cur_mid || in_single) {
|
if (cur_mid || in_single) {
|
||||||
|
@ -708,7 +718,7 @@ arg : lhs '=' arg
|
||||||
}
|
}
|
||||||
| tUPLUS arg
|
| tUPLUS arg
|
||||||
{
|
{
|
||||||
if (nd_type($2) == NODE_LIT) {
|
if ($2 && nd_type($2) == NODE_LIT) {
|
||||||
$$ = $2;
|
$$ = $2;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -717,7 +727,7 @@ arg : lhs '=' arg
|
||||||
}
|
}
|
||||||
| tUMINUS arg
|
| tUMINUS arg
|
||||||
{
|
{
|
||||||
if (nd_type($2) == NODE_LIT && FIXNUM_P($2->nd_lit)) {
|
if ($2 && nd_type($2) == NODE_LIT && FIXNUM_P($2->nd_lit)) {
|
||||||
long i = FIX2LONG($2->nd_lit);
|
long i = FIX2LONG($2->nd_lit);
|
||||||
|
|
||||||
$2->nd_lit = INT2FIX(-i);
|
$2->nd_lit = INT2FIX(-i);
|
||||||
|
|
5
ruby.c
5
ruby.c
|
@ -392,7 +392,10 @@ proc_options(argcp, argvp)
|
||||||
s = argv[1];
|
s = argv[1];
|
||||||
argc--,argv++;
|
argc--,argv++;
|
||||||
}
|
}
|
||||||
if (*s && chdir(s) < 0) {
|
if (!s || !*s) {
|
||||||
|
rb_fatal("Can't chdir");
|
||||||
|
}
|
||||||
|
if (chdir(s) < 0) {
|
||||||
rb_fatal("Can't chdir to %s", s);
|
rb_fatal("Can't chdir to %s", s);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -31,7 +31,7 @@ for i in ifp = open(basename)
|
||||||
end
|
end
|
||||||
ofp.write(i)
|
ofp.write(i)
|
||||||
line = line + 1
|
line = line + 1
|
||||||
if line >= lines
|
if line >= lines and !ifp.eof?
|
||||||
ofp.write("END--cut here--cut here\n")
|
ofp.write("END--cut here--cut here\n")
|
||||||
ofp.close
|
ofp.close
|
||||||
part = part + 1
|
part = part + 1
|
||||||
|
|
4
signal.c
4
signal.c
|
@ -317,7 +317,7 @@ signal_exec(sig)
|
||||||
case SIGINT:
|
case SIGINT:
|
||||||
rb_thread_interrupt();
|
rb_thread_interrupt();
|
||||||
break;
|
break;
|
||||||
#ifndef NT
|
#if !defined(NT) && !defined(__human68k__)
|
||||||
case SIGHUP:
|
case SIGHUP:
|
||||||
#endif
|
#endif
|
||||||
#ifdef SIGQUIT
|
#ifdef SIGQUIT
|
||||||
|
@ -498,7 +498,7 @@ trap(arg)
|
||||||
if (func == SIG_DFL) {
|
if (func == SIG_DFL) {
|
||||||
switch (sig) {
|
switch (sig) {
|
||||||
case SIGINT:
|
case SIGINT:
|
||||||
#ifndef NT
|
#if !defined(NT) && !defined(__human68k__)
|
||||||
case SIGHUP:
|
case SIGHUP:
|
||||||
#endif
|
#endif
|
||||||
#ifdef SIGQUIT
|
#ifdef SIGQUIT
|
||||||
|
|
|
@ -18,7 +18,7 @@ LDFLAGS = $(CFLAGS) -Fm
|
||||||
#LDFLAGS = $(CFLAGS) -Fm
|
#LDFLAGS = $(CFLAGS) -Fm
|
||||||
XLDFLAGS =
|
XLDFLAGS =
|
||||||
#EXTLIBS =
|
#EXTLIBS =
|
||||||
LIBS = advapi32.lib wsock32.lib $(EXTLIBS)
|
LIBS = user32.lib advapi32.lib wsock32.lib $(EXTLIBS)
|
||||||
MISSING = crypt.obj alloca.obj win32.obj isinf.obj isnan.obj
|
MISSING = crypt.obj alloca.obj win32.obj isinf.obj isnan.obj
|
||||||
LDSHARED =
|
LDSHARED =
|
||||||
DLDFLAGS =
|
DLDFLAGS =
|
||||||
|
|
|
@ -7,7 +7,7 @@ s%@FFLAGS@%%g
|
||||||
s%@DEFS@%
|
s%@DEFS@%
|
||||||
-DUSE_THREAD -DSIZEOF_INT=4 -DSIZEOF_SHORT=2 -DSIZEOF_LONG=4 -DSIZEOF_VOIDP=4 -DSIZEOF_FLOAT=4 -DSIZEOF_DOUBLE=8 -DHAVE_PROTOTYPES=1 -DHAVE_STDARG_PROTOTYPES=1 -DHAVE_STDLIB_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_FILE_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ST_RDEV=1 -DGETGROUPS_T=int -DRETSIGTYPE=void -DHAVE_ALLOCA=1 -DHAVE_FMOD=1 -DHAVE_WAITPID=1 -DHAVE_GETCWD=1 -DHAVE_CHSIZE=1 -DHAVE_GETGROUPS=1 -DHAVE_GETLOGIN=1 -DRSHIFT=\(x,y\)\ \(\(x\)\>\>y\) -DFILE_COUNT=_cnt -DDLEXT=\".dll\" -DRUBY_LIB=\"/usr/local/lib/ruby/1.4\" -DRUBY_ARCHLIB=\"/usr/local/lib/ruby/1.4/i386-mswin32\" -DRUBY_PLATFORM=\"i386-mswin32\" %g
|
-DUSE_THREAD -DSIZEOF_INT=4 -DSIZEOF_SHORT=2 -DSIZEOF_LONG=4 -DSIZEOF_VOIDP=4 -DSIZEOF_FLOAT=4 -DSIZEOF_DOUBLE=8 -DHAVE_PROTOTYPES=1 -DHAVE_STDARG_PROTOTYPES=1 -DHAVE_STDLIB_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_FILE_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ST_RDEV=1 -DGETGROUPS_T=int -DRETSIGTYPE=void -DHAVE_ALLOCA=1 -DHAVE_FMOD=1 -DHAVE_WAITPID=1 -DHAVE_GETCWD=1 -DHAVE_CHSIZE=1 -DHAVE_GETGROUPS=1 -DHAVE_GETLOGIN=1 -DRSHIFT=\(x,y\)\ \(\(x\)\>\>y\) -DFILE_COUNT=_cnt -DDLEXT=\".dll\" -DRUBY_LIB=\"/usr/local/lib/ruby/1.4\" -DRUBY_ARCHLIB=\"/usr/local/lib/ruby/1.4/i386-mswin32\" -DRUBY_PLATFORM=\"i386-mswin32\" %g
|
||||||
s%@LDFLAGS@%%g
|
s%@LDFLAGS@%%g
|
||||||
s%@LIBS@%advapi32.lib wsock32.lib%g
|
s%@LIBS@%user32.lib advapi32.lib wsock32.lib%g
|
||||||
s%@exec_prefix@%${prefix}%g
|
s%@exec_prefix@%${prefix}%g
|
||||||
s%@prefix@%/usr/local%g
|
s%@prefix@%/usr/local%g
|
||||||
s%@program_transform_name@%s,x,x,%g
|
s%@program_transform_name@%s,x,x,%g
|
||||||
|
|
|
@ -495,7 +495,7 @@ mypopen (char *cmd, char *mode)
|
||||||
int p[2];
|
int p[2];
|
||||||
|
|
||||||
BOOL fRet;
|
BOOL fRet;
|
||||||
HANDLE hInFile, hOutFile, hStdin, hStdout;
|
HANDLE hInFile, hOutFile;
|
||||||
LPCSTR lpApplicationName = NULL;
|
LPCSTR lpApplicationName = NULL;
|
||||||
LPTSTR lpCommandLine;
|
LPTSTR lpCommandLine;
|
||||||
LPTSTR lpCmd2 = NULL;
|
LPTSTR lpCmd2 = NULL;
|
||||||
|
@ -533,35 +533,14 @@ mypopen (char *cmd, char *mode)
|
||||||
aStartupInfo.dwFlags = STARTF_USESTDHANDLES;
|
aStartupInfo.dwFlags = STARTF_USESTDHANDLES;
|
||||||
|
|
||||||
if (reading) {
|
if (reading) {
|
||||||
aStartupInfo.hStdInput = GetStdHandle(STD_OUTPUT_HANDLE);//hStdin;
|
aStartupInfo.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
|
||||||
aStartupInfo.hStdError = INVALID_HANDLE_VALUE;
|
|
||||||
//for save
|
|
||||||
DuplicateHandle(GetCurrentProcess(), GetStdHandle(STD_OUTPUT_HANDLE),
|
|
||||||
GetCurrentProcess(), &hStdout,
|
|
||||||
0, FALSE, DUPLICATE_SAME_ACCESS
|
|
||||||
);
|
|
||||||
//for redirect
|
|
||||||
DuplicateHandle(GetCurrentProcess(), GetStdHandle(STD_INPUT_HANDLE),
|
|
||||||
GetCurrentProcess(), &hStdin,
|
|
||||||
0, TRUE, DUPLICATE_SAME_ACCESS
|
|
||||||
);
|
|
||||||
aStartupInfo.hStdOutput = hOutFile;
|
aStartupInfo.hStdOutput = hOutFile;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
aStartupInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE); //hStdout;
|
|
||||||
aStartupInfo.hStdError = INVALID_HANDLE_VALUE;
|
|
||||||
// for save
|
|
||||||
DuplicateHandle(GetCurrentProcess(), GetStdHandle(STD_INPUT_HANDLE),
|
|
||||||
GetCurrentProcess(), &hStdin,
|
|
||||||
0, FALSE, DUPLICATE_SAME_ACCESS
|
|
||||||
);
|
|
||||||
//for redirect
|
|
||||||
DuplicateHandle(GetCurrentProcess(), GetStdHandle(STD_OUTPUT_HANDLE),
|
|
||||||
GetCurrentProcess(), &hStdout,
|
|
||||||
0, TRUE, DUPLICATE_SAME_ACCESS
|
|
||||||
);
|
|
||||||
aStartupInfo.hStdInput = hInFile;
|
aStartupInfo.hStdInput = hInFile;
|
||||||
|
aStartupInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||||
}
|
}
|
||||||
|
aStartupInfo.hStdError = GetStdHandle(STD_ERROR_HANDLE);
|
||||||
|
|
||||||
dwCreationFlags = (NORMAL_PRIORITY_CLASS);
|
dwCreationFlags = (NORMAL_PRIORITY_CLASS);
|
||||||
|
|
||||||
|
@ -587,24 +566,12 @@ mypopen (char *cmd, char *mode)
|
||||||
CloseHandle(aProcessInformation.hThread);
|
CloseHandle(aProcessInformation.hThread);
|
||||||
|
|
||||||
if (reading) {
|
if (reading) {
|
||||||
HANDLE hDummy;
|
|
||||||
|
|
||||||
fd = _open_osfhandle((long)hInFile, (_O_RDONLY | pipemode));
|
fd = _open_osfhandle((long)hInFile, (_O_RDONLY | pipemode));
|
||||||
CloseHandle(hOutFile);
|
CloseHandle(hOutFile);
|
||||||
DuplicateHandle(GetCurrentProcess(), hStdout,
|
|
||||||
GetCurrentProcess(), &hDummy,
|
|
||||||
0, TRUE, (DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
HANDLE hDummy;
|
|
||||||
|
|
||||||
fd = _open_osfhandle((long)hOutFile, (_O_WRONLY | pipemode));
|
fd = _open_osfhandle((long)hOutFile, (_O_WRONLY | pipemode));
|
||||||
CloseHandle(hInFile);
|
CloseHandle(hInFile);
|
||||||
DuplicateHandle(GetCurrentProcess(), hStdin,
|
|
||||||
GetCurrentProcess(), &hDummy,
|
|
||||||
0, TRUE, (DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
|
@ -1245,8 +1212,10 @@ opendir(char *filename)
|
||||||
// check to see if we\'ve got a directory
|
// check to see if we\'ve got a directory
|
||||||
//
|
//
|
||||||
|
|
||||||
if (stat (filename, &sbuf) < 0 ||
|
if ((stat (filename, &sbuf) < 0 ||
|
||||||
sbuf.st_mode & _S_IFDIR == 0) {
|
sbuf.st_mode & _S_IFDIR == 0) &&
|
||||||
|
(!isalpha(filename[0]) || filename[1] != ':' || filename[2] != '\0' ||
|
||||||
|
((1 << (filename[0] & 0x5f) - 'A') & GetLogicalDrives()) == 0)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1264,7 +1233,7 @@ opendir(char *filename)
|
||||||
|
|
||||||
strcpy(scanname, filename);
|
strcpy(scanname, filename);
|
||||||
|
|
||||||
if (index("/\\", *(scanname + strlen(scanname) - 1)) == NULL)
|
if (index("/\\:", *CharPrev(scanname, scanname + strlen(scanname))) == NULL)
|
||||||
strcat(scanname, "/*");
|
strcat(scanname, "/*");
|
||||||
else
|
else
|
||||||
strcat(scanname, "*");
|
strcat(scanname, "*");
|
||||||
|
@ -1660,6 +1629,7 @@ myfdopen (int fd, const char *mode)
|
||||||
void
|
void
|
||||||
myfdclose(FILE *fp)
|
myfdclose(FILE *fp)
|
||||||
{
|
{
|
||||||
|
_free_osfhnd(fileno(fp));
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1802,6 +1772,10 @@ myselect (int nfds, fd_set *rd, fd_set *wr, fd_set *ex,
|
||||||
if (!NtSocketsInitialized++) {
|
if (!NtSocketsInitialized++) {
|
||||||
StartSockets();
|
StartSockets();
|
||||||
}
|
}
|
||||||
|
if (nfds == 0 && timeout) {
|
||||||
|
Sleep(timeout->tv_sec * 1000 + timeout->tv_usec / 1000);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if ((r = select (nfds, rd, wr, ex, timeout)) == SOCKET_ERROR) {
|
if ((r = select (nfds, rd, wr, ex, timeout)) == SOCKET_ERROR) {
|
||||||
errno = WSAGetLastError();
|
errno = WSAGetLastError();
|
||||||
switch (errno) {
|
switch (errno) {
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
#undef leave
|
#undef leave
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
}
|
extern "C++" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -103,7 +103,7 @@
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
extern "C" {
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define UIDTYPE int
|
#define UIDTYPE int
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue