diff options
-rw-r--r-- | ChangeLog | 59 | ||||
-rw-r--r-- | Makefile.in | 2 | ||||
-rw-r--r-- | config_s.dj | 2 | ||||
-rw-r--r-- | configure | 41 | ||||
-rw-r--r-- | configure.in | 5 | ||||
-rw-r--r-- | eval.c | 21 | ||||
-rw-r--r-- | ext/Setup | 2 | ||||
-rw-r--r-- | ext/extmk.rb.in | 19 | ||||
-rw-r--r-- | ext/tk/MANIFEST | 24 | ||||
-rw-r--r-- | ext/tk/depend | 1 | ||||
-rw-r--r-- | ext/tk/extconf.rb | 2 | ||||
-rw-r--r-- | ext/tk/lib/tk.rb (renamed from lib/tk.rb) | 0 | ||||
-rw-r--r-- | ext/tk/lib/tkafter.rb (renamed from lib/tkafter.rb) | 0 | ||||
-rw-r--r-- | ext/tk/lib/tkbgerror.rb (renamed from lib/tkbgerror.rb) | 0 | ||||
-rw-r--r-- | ext/tk/lib/tkcanvas.rb (renamed from lib/tkcanvas.rb) | 0 | ||||
-rw-r--r-- | ext/tk/lib/tkclass.rb (renamed from lib/tkclass.rb) | 0 | ||||
-rw-r--r-- | ext/tk/lib/tkdialog.rb (renamed from lib/tkdialog.rb) | 0 | ||||
-rw-r--r-- | ext/tk/lib/tkentry.rb (renamed from lib/tkentry.rb) | 0 | ||||
-rw-r--r-- | ext/tk/lib/tkfont.rb (renamed from lib/tkfont.rb) | 0 | ||||
-rw-r--r-- | ext/tk/lib/tkmenubar.rb (renamed from lib/tkmenubar.rb) | 0 | ||||
-rw-r--r-- | ext/tk/lib/tkmngfocus.rb (renamed from lib/tkmngfocus.rb) | 0 | ||||
-rw-r--r-- | ext/tk/lib/tkpalette.rb (renamed from lib/tkpalette.rb) | 0 | ||||
-rw-r--r-- | ext/tk/lib/tkscrollbox.rb (renamed from lib/tkscrollbox.rb) | 0 | ||||
-rw-r--r-- | ext/tk/lib/tktext.rb (renamed from lib/tktext.rb) | 0 | ||||
-rw-r--r-- | ext/tk/lib/tkvirtevent.rb (renamed from lib/tkvirtevent.rb) | 0 | ||||
-rw-r--r-- | ext/tk/sample/tkbiff.rb (renamed from sample/tkbiff.rb) | 0 | ||||
-rw-r--r-- | ext/tk/sample/tkbrowse.rb (renamed from sample/tkbrowse.rb) | 0 | ||||
-rw-r--r-- | ext/tk/sample/tkdialog.rb (renamed from sample/tkdialog.rb) | 0 | ||||
-rw-r--r-- | ext/tk/sample/tkfrom.rb (renamed from sample/tkfrom.rb) | 0 | ||||
-rw-r--r-- | ext/tk/sample/tkhello.rb (renamed from sample/tkhello.rb) | 0 | ||||
-rw-r--r-- | ext/tk/sample/tkline.rb (renamed from sample/tkline.rb) | 0 | ||||
-rw-r--r-- | ext/tk/sample/tktimer.rb (renamed from sample/tktimer.rb) | 0 | ||||
-rw-r--r-- | ext/tk/tkutil.c | 45 | ||||
-rw-r--r-- | instruby.rb | 34 | ||||
-rw-r--r-- | missing/nt.c | 2 | ||||
-rw-r--r-- | parse.y | 8 | ||||
-rw-r--r-- | sample/ruby-mode.el | 2 | ||||
-rw-r--r-- | sprintf.c | 4 | ||||
-rw-r--r-- | time.c | 1 | ||||
-rw-r--r-- | version.h | 4 |
40 files changed, 222 insertions, 56 deletions
@@ -1,3 +1,62 @@ +Tue Nov 17 18:11:20 1998 Yukihiro Matsumoto <[email protected]> + + * version 1.1c8 released. + +Tue Nov 17 16:58:47 1998 Yukihiro Matsumoto <[email protected]> + + * parse.y (arg): assignment to attribute name start with capital + should be allowed. + + * eval.c (thread_alloc): needed to mark terminated threads too. + +Tue Nov 17 12:33:48 1998 Motoyuki Kasahara <[email protected]> + + * ext/extmk.rb.in (create_makefile): Set `libdir' to `@libdir@', + Set `pkglibdir' to `$libdir/$(RUBY_INSTALL_NAME)'. + +Tue Nov 17 10:30:46 1998 Yukihiro Matsumoto <[email protected]> + + * sprintf.c (f_sprintf): %l%%c -> %%l%c + +Sun Nov 15 15:44:07 1998 Tadayoshi Funaba <[email protected]> + + * ext/extmk.rb.in (install): bug in target. + +Sat Nov 14 11:02:05 1998 Motoyuki Kasahara <[email protected]> + + * Makefile.in (install): Give the argument `$(DESTDIR)' to + `instruby.rb'. + * instruby.rb: Recognize ARG[0] as `destdir'. + * instruby.rb: Give the argument `destdir' to `extmk.rb'. + * ext/extmk.rb.in: Recognize ARG[1] as `$destdir'. + + * instruby.rb: Create the installation directories (bindir, libdir, + archdir, pkglibdir, archdir, and mandir) under `destdir', and + install all files under there. + * ext/extmk.rb.in: Likewise. + +Sat Nov 14 10:56:55 1998 Motoyuki Kasahara <[email protected]> + + * instruby.rb: Add the variable `pkglibdir'. + * instruby.rb: Set the variable `libdir' to `$(libdir)', not + `$(libdir)/$(ruby_install_name)'. `libruby.so' and `libruby.so.LIB' + are installed at `libdir'. + * instruby.rb: Set the variable `archdir' to `$(pkglibdir)/$(arch)'. + +Fri Nov 13 19:43:29 1998 KIMURA Koichi <[email protected]> + + * missing/nt.c (SafeFree): wrong free offset. + +Tue Nov 10 00:22:11 1998 EGUCHI Osamu <[email protected]> + + * configure.in: elf supprt for FreeBSD 3.x + +Thu Nov 12 20:11:53 1998 Koji Arai <[email protected]> + + * sample/ruby-mode.el: wrong highlight. + + * parse.y (parse_regx): newline in regexp was ignored. + Mon Nov 9 17:55:19 1998 Yukihiro Matsumoto <[email protected]> * version 1.1c7 released. diff --git a/Makefile.in b/Makefile.in index f3ac3dd890..f94889be15 100644 --- a/Makefile.in +++ b/Makefile.in @@ -90,7 +90,7 @@ libruby.so: $(OBJS) dmyext.o $(LDSHARED) $(DLDFLAGS) $(SOLIBS) $(OBJS) dmyext.o -o $@ install: rbconfig.rb - ./miniruby$(binsuffix) $(srcdir)/instruby.rb + ./miniruby$(binsuffix) $(srcdir)/instruby.rb $(DESTDIR) clean:; @rm -f $(OBJS) $(LIBRUBY) $(MAINOBJ) rbconfig.rb @rm -f ext/extinit.c ext/extinit.o dmyext.o diff --git a/config_s.dj b/config_s.dj index d6d3836613..c94fd15ce2 100644 --- a/config_s.dj +++ b/config_s.dj @@ -47,3 +47,5 @@ s%@LIBRUBY@%libruby.a%g s%@LIBRUBYARG@%libruby.a%g s%@SOLIBS@%%g s%@arch@%i386-djgpp%g +s%@srcdir%.%g +ac_given_srcdir=. @@ -2679,7 +2679,7 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" for ac_func in dup2 setenv memmove mkdir strcasecmp strerror strftime\ - strchr strstr strtoul strdup crypt flock snprintf + strchr strstr strtoul strdup crypt flock vsnprintf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:2686: checking for $ac_func" >&5 @@ -3460,6 +3460,9 @@ echo "configure:3427: checking whether OS depend dynamic link works" >&5 rb_cv_dlopen=yes ;; linux*) LDSHARED="gcc -shared" rb_cv_dlopen=yes ;; + freebsd3*) LDSHARED="ld -Bshareable" + LDFLAGS="-rdynamic" + rb_cv_dlopen=yes ;; freebsd*) LDSHARED="ld -Bshareable" rb_cv_dlopen=yes ;; netbsd*) LDSHARED="ld -Bshareable" @@ -3503,13 +3506,13 @@ dln_a_out_works=no if test "$ac_cv_header_a_out_h" = yes; then if test "$with_dln_a_out" = yes || test "$rb_cv_dlopen" = unknown; then echo $ac_n "checking whether matz's dln works""... $ac_c" 1>&6 -echo "configure:3507: checking whether matz's dln works" >&5 +echo "configure:3510: checking whether matz's dln works" >&5 cat confdefs.h > config.h if eval "test \"`echo '$''{'rb_cv_dln_a_out'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3513 "configure" +#line 3516 "configure" #include "confdefs.h" #define USE_DLN_A_OUT @@ -3519,7 +3522,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* rb_cv_dln_a_out=yes else @@ -3621,7 +3624,7 @@ fi case "$host_os" in human*) echo $ac_n "checking for _harderr in -lsignal""... $ac_c" 1>&6 -echo "configure:3625: checking for _harderr in -lsignal" >&5 +echo "configure:3628: checking for _harderr in -lsignal" >&5 ac_lib_var=`echo signal'_'_harderr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3629,7 +3632,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsignal $LIBS" cat > conftest.$ac_ext <<EOF -#line 3633 "configure" +#line 3636 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -3640,7 +3643,7 @@ int main() { _harderr() ; return 0; } EOF -if { (eval echo configure:3644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3668,7 +3671,7 @@ else fi echo $ac_n "checking for hmemset in -lhmem""... $ac_c" 1>&6 -echo "configure:3672: checking for hmemset in -lhmem" >&5 +echo "configure:3675: checking for hmemset in -lhmem" >&5 ac_lib_var=`echo hmem'_'hmemset | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3676,7 +3679,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lhmem $LIBS" cat > conftest.$ac_ext <<EOF -#line 3680 "configure" +#line 3683 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -3687,7 +3690,7 @@ int main() { hmemset() ; return 0; } EOF -if { (eval echo configure:3691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3717,12 +3720,12 @@ fi for ac_func in select do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3721: checking for $ac_func" >&5 +echo "configure:3724: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3726 "configure" +#line 3729 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3745,7 +3748,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3770,7 +3773,7 @@ fi done echo $ac_n "checking whether PD libc _dtos18 fail to convert big number""... $ac_c" 1>&6 -echo "configure:3774: checking whether PD libc _dtos18 fail to convert big number" >&5 +echo "configure:3777: checking whether PD libc _dtos18 fail to convert big number" >&5 if eval "test \"`echo '$''{'rb_cv_missing__dtos18'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3778,7 +3781,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 3782 "configure" +#line 3785 "configure" #include "confdefs.h" #include <stdio.h> @@ -3790,7 +3793,7 @@ main () } EOF -if { (eval echo configure:3794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then rb_cv_missing__dtos18=yes else @@ -3812,7 +3815,7 @@ EOF fi echo $ac_n "checking whether PD libc fconvert fail to round""... $ac_c" 1>&6 -echo "configure:3816: checking whether PD libc fconvert fail to round" >&5 +echo "configure:3819: checking whether PD libc fconvert fail to round" >&5 if eval "test \"`echo '$''{'rb_cv_missing_fconvert'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3820,7 +3823,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 3824 "configure" +#line 3827 "configure" #include "confdefs.h" #include <stdio.h> @@ -3833,7 +3836,7 @@ main () } EOF -if { (eval echo configure:3837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then rb_cv_missing_fconvert=yes else diff --git a/configure.in b/configure.in index 9ddce9983e..b978754f05 100644 --- a/configure.in +++ b/configure.in @@ -159,7 +159,7 @@ AC_FUNC_ALLOCA AC_FUNC_VFORK AC_FUNC_MEMCMP AC_REPLACE_FUNCS(dup2 setenv memmove mkdir strcasecmp strerror strftime\ - strchr strstr strtoul strdup crypt flock snprintf) + strchr strstr strtoul strdup crypt flock vsnprintf) AC_CHECK_FUNCS(fmod killpg drand48 random wait4 waitpid syscall getcwd\ truncate chsize times utimes fcntl lockf setitimer\ setruid seteuid setreuid setrgid setegid setregid\ @@ -363,6 +363,9 @@ if test "$with_dln_a_out" != yes; then rb_cv_dlopen=yes ;; linux*) LDSHARED="gcc -shared" rb_cv_dlopen=yes ;; + freebsd3*) LDSHARED="ld -Bshareable" + LDFLAGS="-rdynamic" + rb_cv_dlopen=yes ;; freebsd*) LDSHARED="ld -Bshareable" rb_cv_dlopen=yes ;; netbsd*) LDSHARED="ld -Bshareable" @@ -4839,6 +4839,7 @@ blk_mark(data) gc_mark(data->body); gc_mark(data->self); gc_mark(data->d_vars); + gc_mark(data->klass); data = data->prev; } } @@ -5011,7 +5012,7 @@ proc_call(proc, args) VALUE proc, args; /* OK */ { struct BLOCK * volatile old_block; - struct BLOCK *data; + struct BLOCK *data, data_body; volatile VALUE result = Qnil; int state; volatile int orphan; @@ -5033,7 +5034,12 @@ proc_call(proc, args) /* PUSH BLOCK from data */ old_block = the_block; +#if 0 the_block = data; +#else + data_body = *data; + the_block = &data_body; +#endif PUSH_ITER(ITER_CUR); the_frame->iter = ITER_CUR; @@ -5100,7 +5106,7 @@ block_pass(self, node) { VALUE block = rb_eval(self, node->nd_body); struct BLOCK * volatile old_block; - struct BLOCK *data; + struct BLOCK *data, data_body; volatile VALUE result = Qnil; int state; volatile int orphan; @@ -5122,7 +5128,12 @@ block_pass(self, node) /* PUSH BLOCK from data */ old_block = the_block; +#if 0 the_block = data; +#else + data_body = *data; + the_block = &data_body; +#endif PUSH_ITER(ITER_PRE); the_frame->iter = ITER_PRE; if (FL_TEST(block, PROC_TAINT)) { @@ -5453,6 +5464,7 @@ thread_mark(th) gc_mark(th->last_match); /* mark data in copied stack */ + if (th->status == THREAD_KILLED) return; if (th->stk_len == 0) return; /* stack not active, no need to mark. */ if (th->stk_ptr) { gc_mark_locations(th->stk_ptr, th->stk_ptr+th->stk_len); @@ -5485,7 +5497,7 @@ gc_mark_threads() if (!curr_thread) return; FOREACH_THREAD(th) { - thread_mark(th); + gc_mark(th->thread); } END_FOREACH(th); } @@ -6207,7 +6219,7 @@ thread_alloc() th->last_match = 0; th->abort = 0; - th->thread = data_object_alloc(cThread, th, 0, thread_free); + th->thread = data_object_alloc(cThread, th, thread_mark, thread_free); if (curr_thread) { th->prev = curr_thread; @@ -6250,6 +6262,7 @@ thread_create(fn, arg) void *arg; { thread_t th = thread_alloc(); + volatile VALUE thread = th->thread; int state; enum thread_status status; @@ -7,7 +7,7 @@ #fcntl #kconv #md5 -#socket +socket #tkutil #tcltklib #gtk diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in index aaa3b6d3cf..dbb453df60 100644 --- a/ext/extmk.rb.in +++ b/ext/extmk.rb.in @@ -8,6 +8,7 @@ if ARGV[0] == 'static' ARGV.shift elsif ARGV[0] == 'install' $install = TRUE + $destdir = ARGV[1] || '' ARGV.shift elsif ARGV[0] == 'clean' $clean = TRUE @@ -113,10 +114,10 @@ def install_rb(mfile) end for f in dir next if f == "." - mfile.printf "\t@test -d $(libdir)/%s || mkdir $(libdir)/%s\n", f, f + mfile.printf "\t@test -d $(DESTDIR)$(pkglibdir)/%s || mkdir $(DESTDIR)$(pkglibdir)/%s\n", f, f end for f in path - mfile.printf "\t$(INSTALL_DATA) lib/%s $(libdir)/%s\n", f, f + mfile.printf "\t$(INSTALL_DATA) lib/%s $(DESTDIR)$(pkglibdir)/%s\n", f, f end end @@ -290,8 +291,9 @@ RUBY_INSTALL_NAME = `t='$(program_transform_name)'; echo ruby | sed $$t` prefix = @prefix@ exec_prefix = @exec_prefix@ -libdir = @libdir@/$(RUBY_INSTALL_NAME) -archdir = $(libdir)/@arch@ +libdir = @libdir@ +pkglibdir = $(libdir)/$(RUBY_INSTALL_NAME) +archdir = $(pkglibdir)/@arch@ @SET_MAKE@ #### End of system configuration section. #### @@ -332,12 +334,13 @@ realclean: clean mfile.printf "\ install: - @test -d $(libdir) || mkdir $(libdir) - @test -d $(archdir) || mkdir $(archdir) + @test -d $(DESTDIR)$(libdir) || mkdir $(DESTDIR)$(libdir) + @test -d $(DESTDIR)$(pkglibdir) || mkdir $(DESTDIR)$(pkglibdir) + @test -d $(DESTDIR)$(archdir) || mkdir $(DESTDIR)$(archdir) " if !$static mfile.printf "\ - $(INSTALL) $(TARGET) $(archdir)/$(TARGET) + $(INSTALL) $(TARGET) $(DESTDIR)$(archdir)/$(TARGET) " end install_rb(mfile) @@ -433,7 +436,7 @@ def extmake(target) $extlist.push [$static,target] end if $install - system "make install" + system "make install DESTDIR=#{$destdir}" elsif $clean system "make clean" else diff --git a/ext/tk/MANIFEST b/ext/tk/MANIFEST new file mode 100644 index 0000000000..5096f900c7 --- /dev/null +++ b/ext/tk/MANIFEST @@ -0,0 +1,24 @@ +MANIFEST +tkutil.c +depend +lib/tk.rb +lib/tkafter.rb +lib/tkbgerror.rb +lib/tkcanvas.rb +lib/tkclass.rb +lib/tkdialog.rb +lib/tkentry.rb +lib/tkfont.rb +lib/tkmenubar.rb +lib/tkmngfocus.rb +lib/tkpalette.rb +lib/tkscrollbox.rb +lib/tktext.rb +lib/tkvirtevent.rb +sample/tkbiff.rb +sample/tkbrowse.rb +sample/tkdialog.rb +sample/tkfrom.rb +sample/tkhello.rb +sample/tkline.rb +sample/tktimer.rb diff --git a/ext/tk/depend b/ext/tk/depend new file mode 100644 index 0000000000..e325a82c0f --- /dev/null +++ b/ext/tk/depend @@ -0,0 +1 @@ +tkutil.o: tkutil.c $(hdrdir)/ruby.h $(hdrdir)/config.h $(hdrdir)/defines.h diff --git a/ext/tk/extconf.rb b/ext/tk/extconf.rb new file mode 100644 index 0000000000..f769b06e30 --- /dev/null +++ b/ext/tk/extconf.rb @@ -0,0 +1,2 @@ +require 'mkmf' +create_makefile("tkutil") diff --git a/lib/tk.rb b/ext/tk/lib/tk.rb index e32723be96..e32723be96 100644 --- a/lib/tk.rb +++ b/ext/tk/lib/tk.rb diff --git a/lib/tkafter.rb b/ext/tk/lib/tkafter.rb index be2e50ff3a..be2e50ff3a 100644 --- a/lib/tkafter.rb +++ b/ext/tk/lib/tkafter.rb diff --git a/lib/tkbgerror.rb b/ext/tk/lib/tkbgerror.rb index 8022077a3f..8022077a3f 100644 --- a/lib/tkbgerror.rb +++ b/ext/tk/lib/tkbgerror.rb diff --git a/lib/tkcanvas.rb b/ext/tk/lib/tkcanvas.rb index 1cf24eeb7b..1cf24eeb7b 100644 --- a/lib/tkcanvas.rb +++ b/ext/tk/lib/tkcanvas.rb diff --git a/lib/tkclass.rb b/ext/tk/lib/tkclass.rb index 0b33d4ec8b..0b33d4ec8b 100644 --- a/lib/tkclass.rb +++ b/ext/tk/lib/tkclass.rb diff --git a/lib/tkdialog.rb b/ext/tk/lib/tkdialog.rb index 1133db6ae9..1133db6ae9 100644 --- a/lib/tkdialog.rb +++ b/ext/tk/lib/tkdialog.rb diff --git a/lib/tkentry.rb b/ext/tk/lib/tkentry.rb index b834c455c6..b834c455c6 100644 --- a/lib/tkentry.rb +++ b/ext/tk/lib/tkentry.rb diff --git a/lib/tkfont.rb b/ext/tk/lib/tkfont.rb index 1c11f8f842..1c11f8f842 100644 --- a/lib/tkfont.rb +++ b/ext/tk/lib/tkfont.rb diff --git a/lib/tkmenubar.rb b/ext/tk/lib/tkmenubar.rb index 441f3f5c03..441f3f5c03 100644 --- a/lib/tkmenubar.rb +++ b/ext/tk/lib/tkmenubar.rb diff --git a/lib/tkmngfocus.rb b/ext/tk/lib/tkmngfocus.rb index 921fb646e7..921fb646e7 100644 --- a/lib/tkmngfocus.rb +++ b/ext/tk/lib/tkmngfocus.rb diff --git a/lib/tkpalette.rb b/ext/tk/lib/tkpalette.rb index a2dc7c87cb..a2dc7c87cb 100644 --- a/lib/tkpalette.rb +++ b/ext/tk/lib/tkpalette.rb diff --git a/lib/tkscrollbox.rb b/ext/tk/lib/tkscrollbox.rb index 8d129b2f4b..8d129b2f4b 100644 --- a/lib/tkscrollbox.rb +++ b/ext/tk/lib/tkscrollbox.rb diff --git a/lib/tktext.rb b/ext/tk/lib/tktext.rb index 02d5a7f3e0..02d5a7f3e0 100644 --- a/lib/tktext.rb +++ b/ext/tk/lib/tktext.rb diff --git a/lib/tkvirtevent.rb b/ext/tk/lib/tkvirtevent.rb index 0d100c2186..0d100c2186 100644 --- a/lib/tkvirtevent.rb +++ b/ext/tk/lib/tkvirtevent.rb diff --git a/sample/tkbiff.rb b/ext/tk/sample/tkbiff.rb index d2d7bf7beb..d2d7bf7beb 100644 --- a/sample/tkbiff.rb +++ b/ext/tk/sample/tkbiff.rb diff --git a/sample/tkbrowse.rb b/ext/tk/sample/tkbrowse.rb index 882f0a489b..882f0a489b 100644 --- a/sample/tkbrowse.rb +++ b/ext/tk/sample/tkbrowse.rb diff --git a/sample/tkdialog.rb b/ext/tk/sample/tkdialog.rb index e83e16d0a8..e83e16d0a8 100644 --- a/sample/tkdialog.rb +++ b/ext/tk/sample/tkdialog.rb diff --git a/sample/tkfrom.rb b/ext/tk/sample/tkfrom.rb index ba0e547799..ba0e547799 100644 --- a/sample/tkfrom.rb +++ b/ext/tk/sample/tkfrom.rb diff --git a/sample/tkhello.rb b/ext/tk/sample/tkhello.rb index 5188fe1c8c..5188fe1c8c 100644 --- a/sample/tkhello.rb +++ b/ext/tk/sample/tkhello.rb diff --git a/sample/tkline.rb b/ext/tk/sample/tkline.rb index 2406b0749f..2406b0749f 100644 --- a/sample/tkline.rb +++ b/ext/tk/sample/tkline.rb diff --git a/sample/tktimer.rb b/ext/tk/sample/tktimer.rb index 34377e2f39..34377e2f39 100644 --- a/sample/tktimer.rb +++ b/ext/tk/sample/tktimer.rb diff --git a/ext/tk/tkutil.c b/ext/tk/tkutil.c new file mode 100644 index 0000000000..58a382a41b --- /dev/null +++ b/ext/tk/tkutil.c @@ -0,0 +1,45 @@ +/************************************************ + + tk.c - + + $Author$ + $Date$ + created at: Fri Nov 3 00:47:54 JST 1995 + +************************************************/ + +#include "ruby.h" + +static VALUE +tk_eval_cmd(argc, argv) + int argc; + VALUE argv[]; +{ + VALUE cmd, rest; + + rb_scan_args(argc, argv, "1*", &cmd, &rest); + return rb_eval_cmd(cmd, rest); +} + +static VALUE +tk_s_new(argc, argv, class) + int argc; + VALUE *argv; + VALUE class; +{ + VALUE obj = obj_alloc(class); + + rb_funcall2(obj, rb_intern("initialize"), argc, argv); + if (iterator_p()) rb_yield_0(obj, obj); + return obj; +} + +Init_tkutil() +{ + VALUE mTK = rb_define_module("TkUtil"); + VALUE cTK = rb_define_class("TkKernel", cObject); + + rb_define_singleton_method(mTK, "eval_cmd", tk_eval_cmd, -1); + + rb_define_singleton_method(cTK, "new", tk_s_new, -1); +} diff --git a/instruby.rb b/instruby.rb index 6d82c3ba17..a08fcb8d33 100644 --- a/instruby.rb +++ b/instruby.rb @@ -3,6 +3,8 @@ require "rbconfig.rb" include Config +destdir = ARGV[0] || '' + $:.unshift CONFIG["srcdir"]+"/lib" require "ftools" @@ -14,38 +16,40 @@ else end ruby_install_name = CONFIG["ruby_install_name"] bindir = CONFIG["bindir"] -libdir = CONFIG["libdir"] + "/" + ruby_install_name -archdir = libdir+"/"+CONFIG["arch"] +libdir = CONFIG["libdir"] +pkglibdir = libdir + "/" + ruby_install_name +archdir = pkglibdir + "/" + CONFIG["arch"] mandir = CONFIG["mandir"] + "/man1" wdir = Dir.getwd -File.makedirs bindir, TRUE +File.makedirs "#{destdir}#{bindir}", TRUE File.install "ruby#{binsuffix}", - "#{bindir}/#{ruby_install_name}#{binsuffix}", 0755, TRUE + "#{destdir}#{bindir}/#{ruby_install_name}#{binsuffix}", 0755, TRUE for dll in Dir['*.dll'] - File.install dll, "#{bindir}/#{dll}", 0755, TRUE + File.install dll, "#{destdir}#{bindir}/#{dll}", 0755, TRUE end -File.makedirs "#{libdir}", TRUE +File.makedirs "#{destdir}#{libdir}", TRUE for lib in ["libruby.so", "libruby.so.LIB"] if File.exist? lib - File.install lib, "#{libdir}", 0644, TRUE + File.install lib, "#{destdir}#{libdir}", 0644, TRUE end end -File.makedirs libdir, TRUE +File.makedirs "#{destdir}#{pkglibdir}", TRUE +File.makedirs "#{destdir}#{archdir}", TRUE Dir.chdir "ext" -system "../miniruby#{binsuffix} extmk.rb install" +system "../miniruby#{binsuffix} extmk.rb install #{destdir}" Dir.chdir CONFIG["srcdir"] IO.foreach 'MANIFEST' do |$_| $_.chop! if /^lib/ - File.install $_, "#{libdir}", 0644, TRUE + File.install $_, "#{destdir}#{pkglibdir}", 0644, TRUE elsif /^[a-z]+\.h$/ - File.install $_, "#{archdir}", 0644, TRUE + File.install $_, "#{destdir}#{archdir}", 0644, TRUE end end -File.makedirs mandir, TRUE -File.install "ruby.1", "#{mandir}", 0644, TRUE +File.makedirs "#{destdir}#{mandir}", TRUE +File.install "ruby.1", "#{destdir}#{mandir}", 0644, TRUE Dir.chdir wdir -File.install "config.h", "#{archdir}", 0644, TRUE -File.install "rbconfig.rb", "#{archdir}", 0644, TRUE +File.install "config.h", "#{destdir}#{archdir}", 0644, TRUE +File.install "rbconfig.rb", "#{destdir}#{archdir}", 0644, TRUE # vi:set sw=2: diff --git a/missing/nt.c b/missing/nt.c index 703556cad7..55f4c4d93c 100644 --- a/missing/nt.c +++ b/missing/nt.c @@ -243,7 +243,7 @@ int SafeFree(char **vec, int vecc) char *p; - p = (char *)(vec - (vecc * sizeof (char *) + 1)); + p = (char *)vec; free(p); return 0; @@ -585,6 +585,11 @@ arg : variable '=' {$$ = assignable($1, 0);} arg $$ = attrset($1, $3, $5); fixpos($$, $5); } + | primary '.' tCONSTANT '=' arg + { + $$ = attrset($1, $3, $5); + fixpos($$, $5); + } | backref '=' arg { value_expr($3); @@ -1898,6 +1903,9 @@ parse_regx(term, paren) } switch (c) { + case '\n': + sourceline++; + break; case '[': in_brack = 1; break; diff --git a/sample/ruby-mode.el b/sample/ruby-mode.el index f4c5ce98f0..254851b782 100644 --- a/sample/ruby-mode.el +++ b/sample/ruby-mode.el @@ -592,7 +592,7 @@ An end of a defun is found by moving forward from the beginning of one." ("[^$\\?]\\('[^\\']*\\(\\\\\\(.\\|\n\\)[^\\']*\\)*'\\)" 1 string) ("[^$\\?]\\(`[^\\`]*\\(\\\\\\(.\\|\n\\)[^\\`]*\\)*`\\)" 1 string) ("^\\s *#.*$" nil comment) - ("[^$@?\\]\\(#[^$@{].*$\\)" 1 comment) + ("[^$@?\\]\\(#[^$@{\n].*$\\)" 1 comment) ("[^a-zA-Z_]\\(\\?\\(\\\\[CM]-\\)*.\\)" 1 string) ("^\\s *\\(require\\|load\\).*$" nil include) ("^\\s *\\(include\\|alias\\|undef\\).*$" nil decl) @@ -396,7 +396,7 @@ f_sprintf(argc, argv) sc = ' '; width--; } - sprintf(fbuf, "%l%%c", c); + sprintf(fbuf, "%%l%c", c); sprintf(nbuf, fbuf, v); s = nbuf; goto format_integer; @@ -406,7 +406,7 @@ f_sprintf(argc, argv) strcpy(s, ".."); s += 2; } - sprintf(fbuf, "%l%%c", *p); + sprintf(fbuf, "%%l%c", *p); sprintf(s, fbuf, v); if (v < 0) { char d = 0; @@ -807,7 +807,6 @@ time_dump(time, limit) buf[i] = sec & 0xff; sec = RSHIFT(sec, 8); } - printf("::"); for (i=4; i<8; i++) { buf[i] = usec & 0xff; usec = RSHIFT(usec, 8); @@ -1,2 +1,2 @@ -#define RUBY_VERSION "1.1c7" -#define VERSION_DATE "98/11/09" +#define RUBY_VERSION "1.1c8" +#define VERSION_DATE "98/11/17" |