Граф коммитов

119 Коммитов

Автор SHA1 Сообщение Дата
zzak 7b297f0c79 * ext/curses/extconf.rb: [DOC] nodoc to reduce Object pollution
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-30 02:02:19 +00:00
zzak ffb9da9fa0 * ext/curses/curses.c: [DOC] Update location of samples
* samples/curses/*: Move Curses samples and refactor from mixin
  The samples are included in rdoc for module and use of mixin is
  confusing


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-29 13:25:46 +00:00
shugo 1f828497d1 * safe.c (rb_set_safe_level, safe_setter): raise an ArgumentError
when $SAFE is set to 4.  $SAFE=4 is now obsolete.
  [ruby-core:55222] [Feature #8468]

* object.c (rb_obj_untrusted, rb_obj_untrust, rb_obj_trust):
  Kernel#untrusted?, untrust, and trust are now deprecated.
  Their behavior is same as tainted?, taint, and untaint,
  respectively.

* include/ruby/ruby.h (OBJ_UNTRUSTED, OBJ_UNTRUST): OBJ_UNTRUSTED()
  and OBJ_UNTRUST() are aliases of OBJ_TAINTED() and OBJ_TAINT(),
  respectively.

* array.c, class.c, debug.c, dir.c, encoding.c, error.c, eval.c,
  ext/curses/curses.c, ext/dbm/dbm.c, ext/dl/cfunc.c,
  ext/dl/cptr.c, ext/dl/dl.c, ext/etc/etc.c, ext/fiddle/fiddle.c,
  ext/fiddle/pointer.c, ext/gdbm/gdbm.c, ext/readline/readline.c,
  ext/sdbm/init.c, ext/socket/ancdata.c, ext/socket/basicsocket.c,
  ext/socket/socket.c, ext/socket/udpsocket.c,
  ext/stringio/stringio.c, ext/syslog/syslog.c, ext/tk/tcltklib.c,
  ext/win32ole/win32ole.c, file.c, gc.c, hash.c, io.c, iseq.c,
  load.c, marshal.c, object.c, proc.c, process.c, random.c, re.c,
  safe.c, string.c, thread.c, transcode.c, variable.c,
  vm_insnhelper.c, vm_method.c, vm_trace.c: remove code for
  $SAFE=4.

* test/dl/test_dl2.rb, test/erb/test_erb.rb,
  test/readline/test_readline.rb,
  test/readline/test_readline_history.rb, test/ruby/test_alias.rb,
  test/ruby/test_array.rb, test/ruby/test_dir.rb,
  test/ruby/test_encoding.rb, test/ruby/test_env.rb,
  test/ruby/test_eval.rb, test/ruby/test_exception.rb,
  test/ruby/test_file_exhaustive.rb, test/ruby/test_hash.rb,
  test/ruby/test_io.rb, test/ruby/test_method.rb,
  test/ruby/test_module.rb, test/ruby/test_object.rb,
  test/ruby/test_pack.rb, test/ruby/test_rand.rb,
  test/ruby/test_regexp.rb, test/ruby/test_settracefunc.rb,
  test/ruby/test_struct.rb, test/ruby/test_thread.rb,
  test/ruby/test_time.rb: remove tests for $SAFE=4.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12 14:20:51 +00:00
ktsj edb98f8b91 fix typos. Patch by k_takata.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-19 03:10:21 +00:00
nobu f0a5e1fc3c curses/extconf.rb: simplify
* ext/curses/extconf.rb (curses_version): try once for each tests, a
  function or a variable.  fallback to variable for old SVR4.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-01 07:48:06 +00:00
zzak 7e70b8ac52 * ext/curses/curses.c: Update Curses::Window example for nicer output
Patch by Michal Suchanek [Bug #8121] [ruby-core:53520]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-27 23:30:11 +00:00
akr a36cd96c2a * ext/curses/extconf.rb: Test linkability of curses_version at first.
* ext/socket/extconf.rb: Test the behavior of fd passing with MSG_PEEK
  only if recvmsg(), msg_control member, AF_UNIX and SCM_RIGHTS are
  available.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-26 03:43:19 +00:00
akr 5e9dc52be5 * ext/curses/extconf.rb: Implement
--with-curses-version={function,variable} configure option for
  cross-compiling.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-25 14:17:33 +00:00
akr b47138580c * lib/mkmf.rb: Add ruby/ruby.h, ruby/missing.h, ruby/intern.h,
ruby/st.h and ruby/subst.h for ruby_headers in generated Makefile.

* ext/-test-/old_thread_select/depend: Update dependencies.

* ext/-test-/wait_for_single_fd/depend: Ditto.

* ext/bigdecimal/depend: Ditto.

* ext/curses/depend: Ditto.

* ext/digest/bubblebabble/depend: Ditto.

* ext/digest/depend: Ditto.

* ext/digest/md5/depend: Ditto.

* ext/digest/rmd160/depend: Ditto.

* ext/digest/sha1/depend: Ditto.

* ext/digest/sha2/depend: Ditto.

* ext/dl/callback/depend: Ditto.

* ext/dl/depend: Ditto.

* ext/etc/depend: Ditto.

* ext/nkf/depend: Ditto.

* ext/objspace/depend: Ditto.

* ext/pty/depend: Ditto.

* ext/readline/depend: Ditto.

* ext/ripper/depend: Ditto.

* ext/sdbm/depend: Ditto.

* ext/socket/depend: Ditto.

* ext/stringio/depend: Ditto.

* ext/strscan/depend: Ditto.

* ext/syslog/depend: Ditto.

* ext/-test-/num2int/depend: Removed.

* ext/dbm/depend: Ditto.

* ext/fcntl/depend: Ditto.

* ext/gdbm/depend: Ditto.

* ext/racc/cparse/depend: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-13 00:46:29 +00:00
nobu e3b9ed7649 curses.c: fix function
* ext/curses/curses.c (Init_curses): fix implementation function,
  crmode should be same as cbreak.  [ruby-core:54013] [Bug #8222]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05 04:23:05 +00:00
zzak b0446f37a6 * ext/curses/hello.rb: Typo in Curses example by Drew Blas
[Fixes GH-273]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05 03:10:14 +00:00
shugo cdabc58f8e * ext/curses/curses.c (window_cury, window_curx, window_maxy,
window_maxx, window_begy, window_begx): use RB_UNUSED_VAR()
  to suppress unused-but-set-variable warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-29 12:54:41 +00:00
knu 316947eaa4 * ext/curses/view.rb: Do not fail if the file to view is shorter
than the screen height.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-07 15:36:14 +00:00
nobu af6c038b23 remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-04 00:57:31 +00:00
shugo 5d743d7662 * ext/curses/extconf.rb: support PDCurses. patched by Luis Lavena.
[ruby-core:46485] [Feature #6735]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-18 07:11:20 +00:00
nobu c51a826764 rb_thread_call_without_gvl
* include/ruby/thread.h: new header file for thread stuff.
* thread.c (rb_thread_call_without_gvl): export.  [Feature#4328]
  returns void* instead of VALUE.  [Feature #5543]
* thread.c (rb_thread_blocking_region): deprecate.  [ruby-core:46295]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-10 13:57:11 +00:00
nobu 9373d91585 suppress unused-but-set-variable warnings
* ext/curses/curses.c (window_cury, window_curx, window_maxy)
  (window_maxx, window_begy, window_begx): suppress
  unused-but-set-variable warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-19 10:13:32 +00:00
nobu d9b578f4a0 * ext/curses/curses.c (curses_pair_number): suppress 64-to-32 warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-17 14:05:09 +00:00
akr b82f8f7191 add a comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-26 13:24:52 +00:00
drbrain 6878e597c4 * ext/curses/curses.c (window_nodelay): Fixed call-seq of nodelay to
include the '='.

  Improved description window.nodelay=.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-18 23:59:22 +00:00
akr 51438b1c15 ad comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-25 07:31:13 +00:00
akr d9adb03dd9 * ext/curses/curses.c (Init_curses): use rb_define_const once for
Curses::VERSION.

* ext/dbm/dbm.c (Init_dbm): ditto for DBM::VERSION.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-25 02:09:22 +00:00
akr aa281e7517 * ext/curses/curses.c (Init_curses): make Curses::VERSION
understandable without context.

* ext/dbm/dbm.c (Init_dbm): ditto for DBM::VERSION.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-25 01:36:33 +00:00
akr 427035c0bb add comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-23 15:22:06 +00:00
akr a49fc9beb6 * ext/curses/rain.rb: trap SIGHUP, SIGINT, SIGQUIT and SIGTERM only.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-23 10:59:00 +00:00
akr 01433e4d53 * ext/curses/curses.c: use defined() to suppress a warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-22 12:46:44 +00:00
akr 7c80d15165 * ext/curses/extconf.rb: refactored.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-22 12:45:04 +00:00
akr c01d52e8d9 * ext/curses/extconf.rb: try to distinguish curses_version is a
function or variable.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-22 11:44:26 +00:00
akr fa65fc9aeb * ext/curses/extconf.rb: show the chosen header and library.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-22 10:48:59 +00:00
akr 9fc31792ce * ext/curses/extconf.rb: refactored.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-22 10:09:31 +00:00
akr 25df75e119 * ext/curses/curses.c (Init_curses): use curses_version() for
Curses::VERSION.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-21 10:40:20 +00:00
akr b17bc95400 * ext/curses/extconf.rb: fold too long lines.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-20 12:41:23 +00:00
akr 83f742f86f * ext/curses/curses.c (Init_curses): define Curses::VERSION.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-20 12:10:00 +00:00
akr 9f6f0788d2 * ext/curses/extconf.rb: restore $libs and $defs for each
header/library choice.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-20 12:09:25 +00:00
nobu d3b540cf40 * ext/curses/curses.c (cWindow, cMouseEvent): made typed data.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-18 09:06:48 +00:00
shugo e5f8aa95a3 * ext/curses/curses.c: added the new class Curses::Pad, which
supports scrolling.  patch by Eric Hodel.  [Feature #4896]
  [ruby-core:37206]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-17 15:10:06 +00:00
drbrain becd789625 * ext/curses/curses.c: Clean up documentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 04:10:37 +00:00
drbrain 630ba53d29 * ext/curses/curses.c: Document curses constants. Patch by Vincent
Batts.  [Ruby 1.9 - Bug #4880]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 00:25:43 +00:00
drbrain ce9d84a9f0 * ext/curses/curses.c: Remove color constants block.
[Ruby 1.9 - Bug #4748]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-25 02:54:48 +00:00
drbrain eab122534d * ext/curses/curses.c: Add missing documentation for button state, MIN
and MAX comments.  Add Curses. to TABSIZE= and ESCDELAY= methods.
	  [Ruby 1.9 - Bug #4747]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-25 00:57:07 +00:00
nobu 0d6d23b25d * ext: remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-22 09:26:02 +00:00
drbrain d235b822d2 * ext/curses/curses.c: Complete documentation. Patch by Vincent
Batts.  [Ruby 1.9 - Bug #4748]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-22 02:08:30 +00:00
drbrain 42cb637942 * ext/.document: Add curses to documented extensions.
* ext/curses/curses.c:  Improve documentation.  Patch by Vincent Batts.
	  [Ruby 1.9 - Bug #4747]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-20 18:00:26 +00:00
akr bc2abdcac4 * ext/curses/curses.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-13 22:35:29 +00:00
akr 41d0788e40 * ext/curses/curses.c (CHECK): unused macro removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-03 11:05:13 +00:00
nobu c53664c84d .cvsignore: have not been used already. [Bug #3468]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07 05:43:21 +00:00
shugo 5fe1f62633 ext/curses/view2.rb: replaced with Hugh Sasse's version.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-06 14:26:07 +00:00
akr f65dbbd24a * ext/curses/curses.c: use rb_thread_blocking_region to avoid
rb_read_check.  This makes other threads runnable in getstr and
  wgetstr.
  (getch_func): extracted from curses_getch.
  (curses_getch): use rb_thread_blocking_region with getch_func.
  (getstr_func): extracted from curses_getstr.
  (curses_getstr): use rb_thread_blocking_region with getstr_func.
  (wgetch_func): extracted from window_getch.
  (window_getch): use rb_thread_blocking_region with wgetch_func.
  (wgetstr_func): extracted from window_getstr.
  (window_getstr): use rb_thread_blocking_region with wgetstr_func.

* include/ruby/io.h (rb_read_check): deprecated because it access
  internal of stdio.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-10 10:49:47 +00:00
marcandre f0cdcf6f4e * ext/curses/curses.c: Many functions of module Curses could cause a crash if the ncurses library was not properly initialized.
Fix pointed out by Alexander Beisig [ruby-core:22592]
  Functions fixed: attroff, attron, attrset, bkgd, bkgdset, can_change_color, close_screen, closed, color_content, curs_set, def_prog_mode, delch, deleteln, getmouse, getstr, has_colors, init_color, init_pair, insertln, keyname, mouseinterval, mousemask, pair_content, pair_number, reset_prog_mode, resizeterm, scrl, setscrreg, standend, standout, start_color, timeout, ungetmouse, use_default_colors

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-08 17:12:36 +00:00
akr be2d3f5979 * ext/curses/curses.c: use rb_f_notimplement for methods not
implemented.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-18 12:09:23 +00:00