diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-11-26 08:25:51 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-11-26 08:25:51 +0000 |
commit | 11187ce939d94c3a2f6d9239114c2696a8271834 (patch) | |
tree | cfa74a6ea96d9652aae8da349eec2da41b2aca64 | |
parent | 8271cacad706ed0d7741889faebb0c19270b8370 (diff) |
1.1c9 - 1.1c final, hopefully
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 16 | ||||
-rw-r--r-- | MANIFEST | 21 | ||||
-rw-r--r-- | beos/ruby.def.in | 2 | ||||
-rw-r--r-- | ext/Setup | 2 | ||||
-rw-r--r-- | ext/extmk.rb.in | 15 | ||||
-rw-r--r-- | ext/md5/md5init.c | 4 | ||||
-rw-r--r-- | ext/tk/MANIFEST | 3 | ||||
-rw-r--r-- | intern.h | 1 | ||||
-rw-r--r-- | io.c | 6 | ||||
-rw-r--r-- | missing/nt.c | 17 | ||||
-rw-r--r-- | parse.y | 4 | ||||
-rw-r--r-- | re.h | 1 | ||||
-rw-r--r-- | sample/ruby-mode.el | 12 | ||||
-rw-r--r-- | time.c | 4 | ||||
-rw-r--r-- | version.h | 4 |
15 files changed, 62 insertions, 50 deletions
@@ -1,3 +1,19 @@ +Wed Nov 25 13:07:12 1998 Yukihiro Matsumoto <matz@netlab.co.jp> + + * parse.y (yycompile): reduce known memory leak (hard to remove). + +Sat Nov 21 18:44:06 1998 Masaki Fukushima <fukusima@goto.info.waseda.ac.jp> + + * time.c (time_s_now): had memory leak. + + * ext/md5/md5init.c (md5_new): had memory leak. + + * ext/md5/md5init.c (md5_clone): ditto. + +Wed Nov 18 10:48:09 1998 Yukihiro Matsumoto <matz@netlab.co.jp> + + * io.c (read_all): SEGV on large files. + Tue Nov 17 18:11:20 1998 Yukihiro Matsumoto <matz@netlab.co.jp> * version 1.1c8 released. @@ -129,20 +129,6 @@ lib/tempfile.rb lib/thread.rb lib/thwait.rb lib/timeout.rb -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 lib/tracer.rb lib/weakref.rb missing/alloca.c @@ -215,13 +201,6 @@ sample/sieve.rb sample/svr.rb sample/test.rb sample/time.rb -sample/tkbiff.rb -sample/tkbrowse.rb -sample/tkdialog.rb -sample/tkfrom.rb -sample/tkhello.rb -sample/tkline.rb -sample/tktimer.rb sample/trojan.rb sample/tsvr.rb sample/uumerge.rb diff --git a/beos/ruby.def.in b/beos/ruby.def.in index 04de159208..cad42a4ae6 100644 --- a/beos/ruby.def.in +++ b/beos/ruby.def.in @@ -134,7 +134,6 @@ io_write iterator_p lastline_get lastline_set -local_var_append memclear mod_constants module_new @@ -264,7 +263,6 @@ rb_type rb_undef_method rb_yield rb_yield_0 -reg_free reg_last_match reg_match reg_match2 @@ -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 dbb453df60..b60951538d 100644 --- a/ext/extmk.rb.in +++ b/ext/extmk.rb.in @@ -304,7 +304,7 @@ archdir = $(pkglibdir)/@arch@ mfile.printf "OBJS = " if !$objs then $objs = [] - for f in Dir["#{$top_srcdir}/ext/#{target}/*.{c,cc}"] + for f in Dir["#{$top_srcdir}/ext/#{$mdir}/*.{c,cc}"] f = File.basename(f) f.sub!(/\.(c|cc)$/, ".o") $objs.push f @@ -323,7 +323,7 @@ binsuffix = @binsuffix@ all: $(TARGET) -clean:; @rm -f *.o *.so *.sl +clean:; @rm -f *.o *.a *.so *.sl @rm -f Makefile extconf.h conftest.* @rm -f core ruby$(binsuffix) *~ @@ -350,7 +350,7 @@ install: mfile.printf "\ $(TARGET): $(OBJS) @AR@ cru $(TARGET) $(OBJS) - @-@RANLIB@ $(LIBRUBY) 2> /dev/null || true + @-@RANLIB@ $(TARGET) 2> /dev/null || true " elsif "@DLEXT@" != "o" mfile.printf "\ @@ -416,8 +416,9 @@ def extmake(target) $LDFLAGS = nil begin - system "mkdir " + target unless File.directory?(target) + system "mkdir", target unless File.directory?(target) Dir.chdir target + $mdir = target if $static_ext.size > 0 || !File.exist?("./Makefile") || older("./Makefile", "#{$top_srcdir}/ext/@setup@") || @@ -541,7 +542,11 @@ if $extlist.size > 0 `rm -f ruby@binsuffix@` end - $extobjs = "ext/extinit.o " + $extobjs + if $extobjs + $extobjs = "ext/extinit.o " + $extobjs + else + $extobjs = "ext/extinit.o " + end if PLATFORM =~ /m68k-human|beos/ $extlibs.gsub!("-L/usr/local/lib", "") if $extlibs end diff --git a/ext/md5/md5init.c b/ext/md5/md5init.c index 65fd996ca9..ab29935c41 100644 --- a/ext/md5/md5init.c +++ b/ext/md5/md5init.c @@ -53,7 +53,7 @@ md5_clone(obj) MD5_CTX *md5, *md5_new; Data_Get_Struct(obj, MD5_CTX, md5); - obj = Data_Make_Struct(CLASS_OF(obj), MD5_CTX, 0, 0, md5_new); + obj = Data_Make_Struct(CLASS_OF(obj), MD5_CTX, 0, free, md5_new); *md5_new = *md5; return obj; @@ -72,7 +72,7 @@ md5_new(argc, argv, class) rb_scan_args(argc, argv, "01", &arg); if (!NIL_P(arg)) Check_Type(arg, T_STRING); - obj = Data_Make_Struct(class, MD5_CTX, 0, 0, md5); + obj = Data_Make_Struct(class, MD5_CTX, 0, free, md5); MD5Init(md5); if (!NIL_P(arg)) { md5_update(obj, arg); diff --git a/ext/tk/MANIFEST b/ext/tk/MANIFEST index 5096f900c7..9689186bf0 100644 --- a/ext/tk/MANIFEST +++ b/ext/tk/MANIFEST @@ -1,6 +1,7 @@ MANIFEST -tkutil.c +extconf.rb depend +tkutil.c lib/tk.rb lib/tkafter.rb lib/tkbgerror.rb @@ -200,7 +200,6 @@ void yyappend_print _((void)); void yywhile_loop _((int, int)); int rb_is_const_id _((ID)); int rb_is_instance_id _((ID)); -void local_var_append _((ID)); VALUE backref_get _((void)); void backref_set _((VALUE)); VALUE lastline_get _((void)); @@ -370,7 +370,6 @@ read_all(port) GetOpenFile(port, fptr); io_readable(fptr); - str = str_new(0, siz); if (fstat(fileno(fptr->f), &st) == 0 && S_ISREG(st.st_mode) #ifdef __BEOS__ && (st.st_dev > 3) @@ -385,6 +384,7 @@ read_all(port) } } } + str = str_new(0, siz); for (;;) { READ_CHECK(fptr->f); TRAP_BEG; @@ -2455,12 +2455,12 @@ arg_read(argc, argv) retry: if (!next_argv()) return str; tmp = io_read(argc, argv, file); - if (NIL_P(tmp) && next_p != -1) { + if ((NIL_P(tmp) || RSTRING(tmp)->len == 0) && next_p != -1) { io_close(file); next_p = 1; goto retry; } - if (NIL_P(tmp)) return str; + if (NIL_P(tmp) || RSTRING(tmp)->len == 0) return str; else if (NIL_P(str)) str = tmp; else str_cat(str, RSTRING(tmp)->ptr, RSTRING(tmp)->len); if (argc == 0) { diff --git a/missing/nt.c b/missing/nt.c index 55f4c4d93c..029dd31d16 100644 --- a/missing/nt.c +++ b/missing/nt.c @@ -251,6 +251,9 @@ int SafeFree(char **vec, int vecc) static char *szInternalCmds[] = { + "append", + "break", + "call", "cd", "chdir", "cls", @@ -264,6 +267,7 @@ static char *szInternalCmds[] = { "md", "mkdir", "path", + "pause", "rd", "rem", "ren", @@ -280,13 +284,18 @@ static char *szInternalCmds[] = { int isInternalCmd(char *cmd) { - int fRet; + int i, fRet; char **vec; - int vecc = NtMakeCmdVector(cmd, &vec, FALSE); - + for( i = 0; szInternalCmds[i] ; i++){ + if(!strcmp(szInternalCmds[i], vec[0])){ + fRet = 1; + break; + } + } + SafeFree (vec, vecc); - return 0; + return fRet; } @@ -1653,7 +1653,7 @@ yycompile(f) eval_tree = 0; newline_seen = 0; - sourcefile = strdup(f); + sourcefile = f; rb_in_compile = 1; n = yyparse(); rb_in_compile = 0; @@ -1686,7 +1686,7 @@ compile_file(f, file, start) lex_pbeg = lex_p = lex_pend = 0; sourceline = start; - return yycompile(f); + return yycompile(strdup(f)); } static int @@ -33,5 +33,4 @@ int str_cicmp _((VALUE, VALUE)); VALUE reg_regcomp _((VALUE)); int reg_search _((VALUE, VALUE, int, int)); VALUE reg_regsub _((VALUE, VALUE, struct re_registers *)); -void reg_free _((Regexp *)); #endif diff --git a/sample/ruby-mode.el b/sample/ruby-mode.el index 254851b782..8bf843c1ea 100644 --- a/sample/ruby-mode.el +++ b/sample/ruby-mode.el @@ -142,7 +142,7 @@ The variable ruby-indent-level controls the amount of indentation. (interactive) (kill-all-local-variables) (use-local-map ruby-mode-map) - (setq mode-name "ruby") + (setq mode-name "Ruby") (setq major-mode 'ruby-mode) (ruby-mode-variables) (run-hooks 'ruby-mode-hook)) @@ -209,7 +209,7 @@ The variable ruby-indent-level controls the amount of indentation. (looking-at ruby-block-mid-re)) (progn (goto-char (match-end 0)) - (looking-at "[^_]"))))))))) + (looking-at "\\>"))))))))) (defun ruby-parse-region (start end) (let ((indent-point end) @@ -464,6 +464,12 @@ The variable ruby-indent-level controls the amount of indentation. (setq bol (point)) (end-of-line) (skip-chars-backward " \t") + (and (re-search-backward "#" (save-excursion + (beginning-of-line) + (point)) t) + (setq state (ruby-parse-region parse-start (point))) + (nth 0 state) + (goto-char (nth 0 state))) (or (bobp) (forward-char -1)) (and (or (and (looking-at ruby-symbol-re) @@ -473,7 +479,7 @@ The variable ruby-indent-level controls the amount of indentation. (goto-char (match-end 0)) (not (looking-at "[a-z_]")))) (and (looking-at ruby-operator-re) - (or (not (or (eq ?/ (char-after (point))))) + (or (not (eq ?/ (char-after (point)))) (null (nth 0 (ruby-parse-region parse-start (point))))) (not (eq (char-after (1- (point))) ?$)) (or (not (eq ?| (char-after (point)))) @@ -60,7 +60,7 @@ time_s_now(klass) VALUE obj; struct time_object *tobj; - obj = Data_Make_Struct(klass, struct time_object, 0, 0, tobj); + obj = Data_Make_Struct(klass, struct time_object, 0, free, tobj); tobj->tm_got=0; if (gettimeofday(&(tobj->tv), 0) == -1) { @@ -79,7 +79,7 @@ time_new_internal(klass, sec, usec) VALUE obj; struct time_object *tobj; - obj = Data_Make_Struct(klass, struct time_object, 0, 0, tobj); + obj = Data_Make_Struct(klass, struct time_object, 0, free, tobj); tobj->tm_got = 0; tobj->tv.tv_sec = sec; tobj->tv.tv_usec = usec; @@ -1,2 +1,2 @@ -#define RUBY_VERSION "1.1c8" -#define VERSION_DATE "98/11/17" +#define RUBY_VERSION "1.1c9" +#define VERSION_DATE "98/11/26" |