80 Commits

Author SHA1 Message Date
Clayton Smith 8e2279d1ff Fix an off-by-one causing a buffer overflow in mirb. 2017-04-13 10:51:26 -04:00
Yukihiro "Matz" Matsumoto 4e84bdb507 Let 'mrb_vm_run()` to restore the calling fiber; ref #3537 2017-04-12 11:01:23 +09:00
Yukihiro "Matz" Matsumoto 60d20e1848 Should restore to the root fiber for each interaction; fix #3537 2017-04-05 13:53:43 +09:00
Yukihiro "Matz" Matsumoto 12f6496ff8 Revert "Adjust VM stack window size; fix #3547"
This reverts commit 6dabb33635.
2017-04-03 19:49:42 +09:00
Yukihiro "Matz" Matsumoto 6dabb33635 Adjust VM stack window size; fix #3547 2017-04-03 19:12:13 +09:00
Malizia R 1c7572bc6a Update mirb.c 2016-07-27 16:51:10 -03:00
Yukihiro "Matz" Matsumoto f7afe1d82a change mrb_run related API names; compatibility macros provided 2016-01-07 22:36:29 +09:00
Yukihiro "Matz" Matsumoto 879e27d0f1 mirb: enlarge code buffer size to 4KB 2016-01-02 16:58:42 +09:00
Yukihiro "Matz" Matsumoto 825ced12de remove duplicated local variable declaration 2015-12-26 11:23:28 +09:00
kyab 1e34b12a02 mirb: Don't exit on Ctrl-C 2015-12-26 10:03:28 +09:00
Yukihiro "Matz" Matsumoto 85bd99757c avoid comparison between signed and unsigned 2015-12-01 10:18:01 +09:00
Yukihiro "Matz" Matsumoto 9a41db6f3a Merge pull request #2950 from mattn/mirb-file-args
mirb should take filename and arguments.
2015-11-27 17:49:35 +09:00
Yukihiro "Matz" Matsumoto 5c405dea3d include changed from by quotes ("") to by brackets (<>); close #3032 2015-11-27 17:48:23 +09:00
Yasuhiro Matsumoto e20c2d78d1 mirb should take filename and arguments. 2015-09-12 13:23:22 +09:00
Yasuhiro Matsumoto 8277e950ee Support windows locale
Add mrb_utf8_from_locale, mrb_utf8_free, mrb_locale_from_utf8, mrb_locale_free. Just works for windows.
2015-09-11 11:12:03 +09:00
Yukihiro "Matz" Matsumoto 52a9712c26 link libncurses when there's /usr/include/curses.h; fix #2905 2015-08-01 16:16:22 +09:00
Terence Lee 7e087d7191 Need mruby-compiler to build mruby-bin-mruby and mruby-bin-mirb for
cross compiles
2015-06-22 13:01:15 -04:00
Huei-Horng Yo 2f4f36b334 Remove unused libterminfo detection code.
The detection code is unused even on OpenBSD 5.7,
because of the standard installation is libtermcap be installed, not libterminfo.

This fixes #2829

Tested on Arch Linux (x86_64) & OpenBSD 5.7 (amd64).

Signed-off-by: Huei-Horng Yo <hiroshi@ghostsinthelab.org>
2015-06-10 12:40:18 +08:00
Huei-Horng Yo be2c156876 Detect if ncurses' backend is terminfo or termcap. fixes #2662
Borrowed from @mattn's code at:
https://github.com/mruby/mruby/issues/2662#issuecomment-65535705

Signed-off-by: Huei-Horng Yo <hiroshi@ghostsinthelab.org>
2015-06-09 21:07:12 +08:00
Tomoyuki Sahara 486870e353 NetBSD does not have libreadline but readline(3) is in libedit. 2015-05-20 12:43:44 +09:00
Yukihiro "Matz" Matsumoto d764632f86 Merge pull request #2680 from sdottaka/add-fflush
mrdb, mirb: Add fflush() so that a external program can read output imme...
2015-01-19 08:30:52 +09:00
Tatsuhiko Kubo dae42ffe54 Removed duplicated declarations.
* `mrb_show_version()`
 * `mrb_show_copyright()`
2015-01-03 22:56:36 +09:00
sdottaka 9a0fb6f91b mrdb, mirb: Add fflush() so that a external program can read output immediately. 2014-12-19 16:09:55 +09:00
Yukihiro "Matz" Matsumoto 9723d6e4ba mirb dies if #inspect returns a non-string value; fix #2666 2014-12-12 13:14:56 +09:00
M.Naruoka 14bc76d578 Under cygwin host, ncurses.a is only available instead of termcap.a. 2014-10-31 16:48:50 +09:00
Tatsuhiko Kubo 6c7ba826dd Use sizeof() instead of strlen(). 2014-08-22 20:37:34 +09:00
Tatsuhiko Kubo 55ee7fe79c Fix error handlings in mirb.
mrb_parser_new() and mrb_generate_code() may return NULL.
2014-08-19 16:04:48 +09:00
cremno 82a335643e call mrb_malloc_simple instead of malloc 2014-07-12 11:50:51 +02:00
cremno 9d597f4d9f allocate history_path dynamically
`PATH_MAX` doesn't have to be defined and if it is, then its value is
usually incorrect (possible buffer overflow).
Use `malloc` and `snprintf` instead to prevent this.

https://www.gnu.org/software/hurd/community/gsoc/project_ideas/maxpath.html
2014-07-11 13:03:13 +02:00
take_cheeze a656daf4c5 Use TRUE instead of 1 in mirb code. 2014-06-30 23:26:23 +09:00
Kouhei Sutou 4f3114dbc9 Add a missing space after "," 2014-06-09 23:00:02 +09:00
cremno 71c7d58736 partially revert 1a5841b for mirb
Fix compilation fail caused by GNU Readline and `ISPRINT`.
Also add missing `unsigned char` cast.
2014-06-06 00:13:24 +02:00
cremno 1a5841b4b1 use uppercase US-ASCII ctype macros 2014-06-05 21:00:47 +02:00
Yukihiro "Matz" Matsumoto 0651051ded allow quit/exit to work within mirb; fix #2253 close #2254
also allow spaces around quit/exit.
2014-05-15 12:07:02 +09:00
Yukihiro "Matz" Matsumoto 0265b47833 remove unnecessary semicolons from a38f8f 2014-05-13 20:17:54 +09:00
Yukihiro "Matz" Matsumoto a38f8fe606 support comments in user-input; also add checks for buffer overflow 2014-05-13 16:03:41 +09:00
Tomoyuki Sahara 6a41149585 libreadline requires libtermcap on OpenBSD. 2014-05-09 14:26:12 +09:00
take_cheeze cf5155f8f7 Suppress warning when using readline in mirb. 2014-05-03 21:24:03 +09:00
take_cheeze 052fe51279 Use header searcher to find readline and linenoise. 2014-05-01 16:49:55 +09:00
Nobuyoshi Nakada ab67c57f65 remove trailing spaces 2014-04-30 09:50:14 +09:00
Yukihiro "Matz" Matsumoto b046ded67d remove mirb regression test that fails on travis-ci only 2014-04-12 23:10:58 +09:00
take_cheeze c73f8d4def move summary of mrbgems in default gembox to its spec 2014-03-17 00:34:24 +09:00
takkaw 0d4bd01cf1 support linenoise in mirb 2014-03-08 01:22:31 +09:00
takkaw d7d8b09580 small refactor 2014-03-05 23:35:34 +09:00
kyab 1cf619d3b4 Fix unused function warning when readline enabled (mirb) 2014-02-23 20:43:43 +09:00
Li Yazhou 876e7de7ec add a regression test for #1706 2014-02-14 11:32:59 +08:00
Li Yazhou 9ebfeac111 keep stack with nlocals instead of nregs; fix #1706 2014-02-14 11:16:56 +08:00
Yukihiro "Matz" Matsumoto d7960bf2a9 resolve conflict in travis_config.rb 2014-02-10 09:50:32 +09:00
Yukihiro "Matz" Matsumoto 19a08b8455 Merge pull request #1674 from cremno/mrb_bool-FALSE-TRUE
use mrb_bool, FALSE and TRUE more
2014-02-09 18:35:20 +09:00
Daniel Bovensiepen 5056a29d93 Remove notice of early version 2014-02-08 03:06:05 +08:00