summaryrefslogtreecommitdiff
path: root/ext/tk/tcltklib.c
AgeCommit message (Collapse)Author
2005-09-28* ext/tk/tcltklib.c: cannot compile with Tcl/Tk8.0.xnagai
[ruby-dev:27335]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-09* ext/tk/tcltklib.c: remove dangerous 'rb_jump_tag's.nagai
* ext/tk/lib/tk.rb: add __val2ruby_optkeys and __ruby2val_optkeys to help to convert option values between ruby and tcl. * ext/tk/lib/tk/itemconfig.rb: add __item_val2ruby_optkeys and __item_ruby2val_optkeys to help to convert option values between ruby and tcl. * ext/tk/lib/tk/radiobutton.rb: use __ruby2val_optkeys for 'variable' option (for the reason of backward compatibility). * ext/tk/lib/tk/composite.rb: clarify the arguments of super(). * ext/tk/lib/tk/spinbox.rb: ditto. * ext/tk/lib/tk/text.rb: ditto. * ext/tk/lib/tk/validation.rb: ditto. * ext/tk/lib/tkextlib/*: support to treat tkvariable-type configure options. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-08* ext/tk/tcltklib.c: restored some DUMPsocean
* ext/tk/tcltklib.c (ip_ruby_cmd): moved rb_ary_new2 because this raises exception if argc < 3. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-06* ext/tk/tcltklib.c: combined tcl_protect and tcl_check_result.ocean
[ruby-dev:26753] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-05* ext/tk/tcltklib.c: rectoring - tcl_protect.ocean
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-05* ext/tk/tcltklib.c: refactoring - extracted status check as function.ocean
(tcl_check_result) ... previous commit is actually "extracted protect call" git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-05* ext/tk/tcltklib.c: refactoring - extracted status check as function. ↵ocean
(tcl_protect) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-05* ext/tk/tcltklib.c: fixed memory leak when tk_funcall raisedocean
exception. (copies argv into heap in tk_funcall instead of caller) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-04* ext/tk/tcltklib.c: refactoring - extract ruby string <->ocean
tcl object conversion as get_str_from_obj and get_obj_from_str. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-04* ext/tk/tcltklib.c: cannot compile for Tcl7.6/Tk4.2.nagai
* ext/tk/tcltklib.c: add nativethread consistency check. * ext/tk/stubs.c: ditto. * ext/tk/lib/tk.rb: forgot to define TclTkIp.encoding and encoding= when Tcl is 7.6 or 8.0. * ext/tk/lib/tk/wm.rb: support to make some methods as options of root or toplevel widget. [ruby-talk:150336] * ext/tk/lib/tk/root.rb: ditto. * ext/tk/lib/tk/toplevel.rb: ditto. * ext/tk/lib/tkextlib/SUPPRT_STATUS: update RELEASE_DATE git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-02* ext/tk/tcltklib.c: use Tcl_[GS]etVar2Ex instead ofocean
Tcl_Obj[GS]etVar2. (avoid Tcl_NewStringObj on supported platforms) * ext/tk/tcltklib.c: use ip_{get,set,unset}_variable2_core from ip_{get,set,unset}_variable. * ext/tk/tcltklib.c: replaced Tcl_Panic with rb_bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-01* ext/tk/tcltklib.c: refactoring - replaced rb_ivar_defined &ocean
rb_ivar_get with single rb_attr_get call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-01* ext/tk/tcltklib.c (Tcl_GetStringResult): refactoring - defineocean
alternative macro on Tcl7.x or earlier. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-01* ext/tk/tcltklib.c (deleted_ip): refactoring - interpreter deletionocean
check. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-28* ext/tk/stubs.c: When --enable-tcltk-stubs, the initializenagai
routine creates a Tcl/Tk interpreter and deletes it. However, init cost of Tk's MainWindow is not so small. And that makes it impossible to use libraries written with Tcl functions only on an environment without a graphical display. This changes support delaying initalization of Tk_Stubs until the script needs Tk. * ext/tk/stubs.h: New file. Define prototypes and return codes of functions on stubs.c. * ext/tk/tcltklib.c: Support delaying initalization of Tk_Stubs until the script needs Tk. * ext/tk/tcltklib.c: Show friendly error messages for errors on initialization. * ext/tk/tcltklib.c: Avoid SEGV on ip_finalize() when ruby is exiting and $DEBUG is true. (Not fix. If you know the reason of why, please fix it.) * ext/tk/tkutil/tkutil.c (ary2list, ary2list2): bug fix on handling of encoding. * ext/tk/lib/multi-tk.rb: MultiTkIp#eval_string and bg_eval_string don't work propery. * ext/tk/lib/tk.rb: Forget extending Tk::Encoding module to Tk. * ext/tk/lib/tk/variable.rb: TkVarAccess fails to initialize the object for an element of a Tcl's array variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-21* ext/tk/tkutil/tkutil.c (tk_conv_args): forget to revertnagai
thread_critical and gc_disable when raise ArgumentError. * ext/tk/lib/remote-tk.rb: RemoteTkIp doesn't need to include TkUtil. * ext/tk/tcltklib.c: add TclTkIp#has_mainwindow? method. * ext/tk/lib/tk.rb: add Tk.has_mainwindow? method. * ext/tk/lib/multi-tk.rb: add MultiTkIp#has_mainwindow? method. * ext/tk/lib/remote-tk.rb: add RemoteTkIp#has_mainwindow? method. * ext/tk/lib/multi-tk.rb: slave IP fail to exit itself when $SAFE==4. * ext/tk/lib/multi-tk.rb: remove constants from MultiTkIp module to avoid access from external. * ext/tk/lib/multi-tk.rb: check_root flag is ignored on slave IPs' mainloop. * ext/tk/lib/multi-tk.rb: hang-up Tk.mainloop called on a slave IP with $SAFE==4. * ext/tk/lib/multi-tk.rb: MultiTkIp#bg_eval_proc doesn't work properly. * ext/tk/lib/multi-tk.rb: add MultiTkIp#set_cb_error(proc) and cb_error(exc) to log errors at callbacks on safe slave IPs. * ext/tk/lib/multi-tk.rb: fail to get an available slave IP object when call Tk.mainloop in the block which is given to new_* method, because cannot finish initialize while the root widget is alive. * ext/tk/lib/multi-tk.rb: fail to control a slave IP when Tk.mainloop runs on the IP. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-19* ext/tk/tcltklib.c: rbtk_eventloop_depth is used as int.ocean
* ext/tk/tcltklib.c: rbtk_pending_exception is tested with NIL_P, so should assign Qnil instead of 0 (Qfalse). * ext/tk/tcltklib.c (ip_invoke_real): fixed memory leak when ip is deleted. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-13* ext/tk/tcltklib.c: TclTkLib.do_one_event doesn't work.nagai
* ext/tk/lib/tk.rb: Tk.thread_update is available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-05* ext/tk/tcltklib.c: bug fix on treating Unicode strings.nagai
* ext/tk/tcltklib.c: add methods to treat encoding mode. * ext/tk/MANUAL_tcltklib.eng: add description of TclTkLib#encoding, encoding_system, and so on. * ext/tk/MANUAL_tcltklib.eucj: ditto. * ext/tk/tkutil/tkutil.c: fail to create a Tcl's list string from an array including multiple kind of encoded strings. * ext/tk/lib/tk.rb: ditto. * ext/tk/lib/multi-tk.rb: 2nd arg of _{to|from}UTF8 is omissible. * ext/tk/lib/remote-tk.rb: ditto. * ext/tk/lib/tk.rb: override TclTkLib#encoding and encoding= to use TkCore::INTERP.encoding and encoding=. * ext/tk/lib/tk.rb: when "require 'tk'" and $KCODE=='NONE', check DEFAULT_TK_ENCODING to decide Ruby/Tk's system encoding mode. * ext/tk/lib/tk/encodedstr.rb: check both of Tk.encoding and Tk.encoding_system. Tk.encoding has higher priority. * ext/tk/lib/tk/optiondb.rb: ditto. * ext/tk/lib/tk/spinbox.rb: ditto. * ext/tk/lib/tk/validation.rb: ditto. * ext/tk/lib/tk/namespace.rb: arguemnts for TclTkIp#_merge_tklist should be UTF-8 strings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-16* ext/tk/tcltklib.c (ip_rb_threadVwaitCommand): Tcl_Release was missing.ocean
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-26* ext/tk/tcltklib.c (ip_invoke_core): call Tcl's "::unknown"nagai
command when can't get information of target command. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-23commit missocean
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-23* ext/tcltklib/tcltklib.c (ip_RubyExitCommand): exit with status codeocean
via TclTkIp#_eval didn't work. [ruby-talk:139390] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-22updated TCLTKLIB_RELEASE_DATEocean
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-22* ext/tk/tcltklib.c (ip_set_exc_message): fixed memory leak.ocean
* ext/tk/tcltklib.c: eTkCallbackReturn was not initialized. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-12* ext/tk/tcltklib.c (ip_finalize): better modification than thenagai
previous commit [ruby-dev:26029]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-12* ext/tk/tcltklib.c (ip_finalize): fix SEGV when Tcl_GlobalEval()nagai
modifies the argument string to eval. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-11* ext/tk/tcltklib.c (ip_finalize): add existence check of Tcl commandsnagai
before calling Tcl_GlobalEval(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-11* ext/tk/tcltklib.c (ip_finalize): adhoc patch to avoid SEGV when exitnagai
on Tcl/Tk8.3.x. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-30* ext/tk/tcltklib.c: add TclTkIp#_create_console() method to createnagai
a Tcl/Tk's console window. * ext/tk/lib/multi-tk.rb: support TclTkIp#_create_console() method. * ext/tk/lib/remote-tk.rb: ditto. * ext/tk/lib/tk/console.rb: ditto. * ext/tk/lib/tk.rb: update RELEASE_DATE * ext/tk/sample/demo-*/check2.rb: use 'return' in the Proc object. * ext/tk/sample/tkextlib/**: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-10* ext/tk/tcltklib.c (lib_eventloop_ensure): mis-delete a timer handlernagai
when exit from a recursive called eventloop * ext/tk/lib/tk/timer.rb: new TkRTTimer class, which can works for a realtime operation * ext/tk/sample/tkrttimer.rb: sample of TkRTTimer class * ext/tk/lib/tk/textmark.rb: move TkTextMark#+ and TkTextMark#- to TkText::IndexModMethods * ext/tk/lib/tk/text.rb: improve TkTextMark#+ and TkTextMark#-, and add them to TkText::IndexModMethods module * ext/tk/sample/tktextio.rb: add test part of "seek by text index modifiers" git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-06* ext/tk/tcltklib.c: fail to call TclTkLib.mainloop when $SAFE==4nagai
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-04* eval.c (rb_exec_recursive): matched the declaration to prototype.usa
* ext/curses/curses.c: don't need to check HAVE_WCOLOR_SET excluding window_color_set(). * ext/tk/tcltklib.c: fixed commit mistakes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-04* array.c: replace rb_protect_inspect() and rb_inspecting_p() bymatz
rb_exec_recursive() in eval.c. * eval.c (rb_exec_recursive): new function. * array.c (rb_ary_join): use rb_exec_recursive(). * array.c (rb_ary_inspect, rb_ary_hash): ditto. * file.c (rb_file_join): ditto. * hash.c (rb_hash_inspect, rb_hash_to_s, rb_hash_hash): ditto. * io.c (rb_io_puts): ditto. * object.c (rb_obj_inspect): ditto * struct.c (rb_struct_inspect): ditto. * lib/set.rb (SortedSet::setup): a hack to shut up warning. [ruby-talk:132866] * lib/time.rb (Time::strptime): add new function. inspired by [ruby-talk:132815]. * lib/parsedate.rb (ParseDate::strptime): ditto. * regparse.c: move st_*_strend() functions from st.c. fixed some potential memory leaks. * exception error messages updated. [ruby-core:04497] * ext/socket/socket.c (Init_socket): add bunch of Socket constants. Patch from Sam Roberts <sroberts@uniserve.com>. [ruby-core:04409] * array.c (rb_ary_s_create): no need for negative argc check. [ruby-core:04463] * array.c (rb_ary_unshift_m): ditto. * lib/xmlrpc/parser.rb (XMLRPC::FaultException): make it subclass of StandardError class, not Exception class. [ruby-core:04429] * parse.y (fcall_gen): lvar(arg) will be evaluated as lvar.call(arg) when lvar is a defined local variable. [new] * object.c (rb_class_initialize): call inherited method before calling initializing block. * eval.c (rb_thread_start_1): initialize newly pushed frame. * lib/open3.rb (Open3::popen3): $? should not be EXIT_FAILURE. fixed: [ruby-core:04444] * eval.c (is_defined): NODE_IASGN is an assignment. * ext/readline/readline.c (Readline.readline): use rl_outstream and rl_instream. [ruby-dev:25699] * ext/etc/etc.c (Init_etc): sGroup needs HAVE_ST_GR_PASSWD check [ruby-dev:25675] * misc/ruby-mode.el: [ruby-core:04415] * lib/rdoc/generators/html_generator.rb: [ruby-core:04412] * lib/rdoc/generators/ri_generator.rb: ditto. * struct.c (make_struct): fixed: [ruby-core:04402] * ext/curses/curses.c (window_color_set): [ruby-core:04393] * ext/socket/socket.c (Init_socket): SO_REUSEPORT added. [ruby-talk:130092] * object.c: [ruby-doc:818] * parse.y (open_args): fix too verbose warnings for the space before argument parentheses. [ruby-dev:25492] * parse.y (parser_yylex): ditto. * parse.y (parser_yylex): the first expression in the parentheses should not be a command. [ruby-dev:25492] * lib/irb/context.rb (IRB::Context::initialize): [ruby-core:04330] * object.c (Init_Object): remove Object#type. [ruby-core:04335] * st.c (st_foreach): report success/failure by return value. [ruby-Bugs-1396] * parse.y: forgot to initialize parser struct. [ruby-dev:25492] * parse.y (parser_yylex): no tLABEL on EXPR_BEG. [ruby-talk:127711] * document updates - [ruby-core:04296], [ruby-core:04301], [ruby-core:04302], [ruby-core:04307] * dir.c (rb_push_glob): should work for NUL delimited patterns. * dir.c (rb_glob2): should aware of offset in the pattern. * string.c (rb_str_new4): should propagate taintedness. * env.h: rename member names in struct FRAME; last_func -> callee, orig_func -> this_func, last_class -> this_class. * struct.c (rb_struct_set): use original method name, not callee name, to retrieve member slot. [ruby-core:04268] * time.c (time_strftime): protect from format modification from GC finalizers. * object.c (Init_Object): remove rb_obj_id_obsolete() * eval.c (rb_mod_define_method): incomplete subclass check. [ruby-dev:25464] * gc.c (rb_data_object_alloc): klass may be NULL. [ruby-list:40498] * bignum.c (rb_big_rand): should return positive random number. [ruby-dev:25401] * bignum.c (rb_big_rand): do not use rb_big_modulo to generate random bignums. [ruby-dev:25396] * variable.c (rb_autoload): [ruby-dev:25373] * eval.c (svalue_to_avalue): [ruby-dev:25366] * string.c (rb_str_justify): [ruby-dev:25367] * io.c (rb_f_select): [ruby-dev:25312] * ext/socket/socket.c (sock_s_getservbyport): [ruby-talk:124072] * struct.c (make_struct): [ruby-dev:25249] * dir.c (dir_open_dir): new function. [ruby-dev:25242] * io.c (rb_f_open): add type check for return value from to_open. * lib/pstore.rb (PStore#transaction): Use the empty content when a file is not found. [ruby-dev:24561] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-03* ext/tk/tcltklib.c (ip_rbUpdateCommand, ip_rb_threadUpdateCommand):nobu
get rid of warnings with Tcl/Tk 8.3 or former. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-02* ext/tk/tcltklib.c (lib_eventloop_core): fix typonagai
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-02* ext/tk/tcltklib.c: enforce thread-check and exception-handling tonagai
avoid SEGV trouble. * ext/tk/tkutil/tkutil.c; fix a bug on converting a SJIS string array to a Tcl's list string. * ext/tk/tcltklib.c: wrap Tcl's original "namespace" command to protect from namespace crash. * ext/tk/lib/multi-tk.rb: enforce exception-handling. * ext/tk/lib/multi-tk.rb: catch IRB_EXIT to work on irb. * ext/tk/lib/tk.rb: ditto. * ext/tk/tcltklib.c: add TclTkLib.mainloop_thread? * ext/tk/lib/multi-tk.rb: (bug fix) callback returns a value. * ext/tk/lib/tk/canvas.rb (delete): bug fix when multiple arguments. * ext/tk/lib/clock.rb: fix 'no method error'. * ext/tk/lib/clock.rb (self.clicks): accept a Symbol argument. * ext/tk/lib/variable.rb: be able to set default_value_type; :numeric, :bool, :string, :symbol, :list, :numlist or nil (default; same to :string). If set a type, TkVariable#value returns a value of the type. * ext/tk/lib/tkextlib/tclx/tclx.rb: add Tk::TclX.signal to warn the risk of using TclX extension's 'signal' command. * ext/tk/sample/irbtk.rb: irb with Ruby/Tk. * ext/tk/sample/demos-*/anilabel.rb: bug fix on 'show code' * ext/tk/sample/demos-*/aniwave.rb: new Ruby/Tk animation demo. * ext/tk/sample/demos-*/pendulum.rb: ditto. * ext/tk/sample/demos-*/goldberg.rb: ditto. * ext/tk/sample/demos-*/widget: add entries of animation demos. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-31* ext/tk/tcltklib.c: add invalid namespace checknagai
* ext/tk/lib/multi-tk.rb: add invalid_namespace? method * ext/tk/lib/remote-tk.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-25* ext/tk: merge tcltklib for Ruby/Tk installation controlnagai
* ext/tcltklib: remove git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e