diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-05-13 10:01:09 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-05-13 10:01:09 +0000 |
commit | ccc13869790d312f614128204c5546d5e9ad0b3f (patch) | |
tree | 4a834e153187f75cc2a336f742aea845f55557e6 | |
parent | c6ac6cb4542b845eb4c18a9e80e15f8deab4f54a (diff) |
990513
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | dln.c | 6 | ||||
-rw-r--r-- | eval.c | 27 | ||||
-rw-r--r-- | ext/Setup | 1 | ||||
-rw-r--r-- | ext/pty/pty.c | 11 | ||||
-rw-r--r-- | ext/socket/addrinfo.h | 2 | ||||
-rw-r--r-- | regex.c | 22 | ||||
-rw-r--r-- | ruby.h | 1 | ||||
-rw-r--r-- | string.c | 1 | ||||
-rw-r--r-- | version.h | 2 |
10 files changed, 65 insertions, 17 deletions
@@ -1,3 +1,12 @@ +Thu May 13 10:40:44 1999 Yukihiro Matsumoto <[email protected]> + + * eval.c (rb_eval_string_wrap): new function. + + * regex.c (re_compile_pattern): POSIX line match should alter + behavior for `^' and `$' to begbuf and endbuf2 respectively. + + * ext/pty/pty.c: un-ANSI-fy function arguments. + Wed May 12 14:19:38 1999 Yukihiro Matsumoto <[email protected]> * struct.c (iv_get): in case of inheritance of generated struct @@ -493,7 +493,7 @@ link_undef(name, base, reloc) } struct reloc_arg { - char *name; + const char *name; long value; }; @@ -1077,7 +1077,7 @@ dln_sym(name) # endif #endif -#ifdef hpux +#ifdef __hpux #include <errno.h> #include "dl.h" #endif @@ -1307,7 +1307,7 @@ dln_load(file) } #endif /* USE_DLN_DLOPEN */ -#ifdef hpux +#ifdef __hpux #define DLN_DEFINED { shl_t lib = NULL; @@ -1125,6 +1125,33 @@ rb_eval_string_protect(str, state) } VALUE +rb_eval_string_wrap(str, state) + const char *str; + int *state; +{ + int status; + VALUE self = ruby_top_self; + VALUE val; + + PUSH_CLASS(); + ruby_class = ruby_wrapper = rb_module_new(); + ruby_top_self = rb_obj_clone(ruby_top_self); + rb_extend_object(self, ruby_class); + + val = rb_eval_string_protect(str, &status); + ruby_top_self = self; + + POP_CLASS(); + if (state) { + if (status == 0) { + JUMP_TAG(state); + } + *state = status; + } + return val; +} + +VALUE rb_eval_cmd(cmd, arg) VALUE cmd, arg; { @@ -1,5 +1,6 @@ #option nodynamic +interbase #GD #curses #dbm diff --git a/ext/pty/pty.c b/ext/pty/pty.c index 0995220995..3748b55e47 100644 --- a/ext/pty/pty.c +++ b/ext/pty/pty.c @@ -22,7 +22,7 @@ #define DEVICELEN 16 #if !defined(HAVE_OPENPTY) -#ifdef hpux +#ifdef __hpux char *MasterDevice = "/dev/ptym/pty%s", *SlaveDevice = "/dev/pty/tty%s", *deviceNo[] = { @@ -108,9 +108,10 @@ struct pty_info { }; static void -set_signal_action(RETSIGTYPE (*action)()) +set_signal_action(action) + RETSIGTYPE (*action)(); { -#ifdef hpux +#ifdef __hpux struct sigvec sv; /* * signal SIGCHLD should be delivered on stop of the child @@ -194,7 +195,9 @@ chld_changed() static void getDevice _((int*, int*)); static void -establishShell(char *shellname, struct pty_info *info) +establishShell(shellname, info) + char *shellname; + struct pty_info *info; { static int i,j,master,slave,currentPid; static char procName[32]; diff --git a/ext/socket/addrinfo.h b/ext/socket/addrinfo.h index 5d2c7dea45..d4e2091d69 100644 --- a/ext/socket/addrinfo.h +++ b/ext/socket/addrinfo.h @@ -69,7 +69,7 @@ # ifdef HAVE_PROTOTYPES # define __P(args) args # else -# define __P(args) +# define __P(args) () # endif #endif @@ -1182,7 +1182,10 @@ re_compile_pattern(pattern, size, bufp) switch (c) { case '$': - { + if (bufp->options & RE_OPTION_POSIXLINE) { + BUFPUSH(endbuf2); + } + else { p0 = p; /* When testing what follows the $, look past the \-constructs that don't consume anything. */ @@ -1195,10 +1198,13 @@ re_compile_pattern(pattern, size, bufp) break; } BUFPUSH(endline); - break; } + break; case '^': - BUFPUSH(begline); + if (bufp->options & RE_OPTION_POSIXLINE) + BUFPUSH(begbuf); + else + BUFPUSH(begline); break; case '+': @@ -1313,8 +1319,6 @@ re_compile_pattern(pattern, size, bufp) if ((enum regexpcode)b[-2] == charset_not) { if (bufp->options & RE_OPTION_POSIXLINE) SET_LIST_BIT ('\n'); - else - SET_LIST_BIT ('\0'); } /* Read in characters and ranges, setting map bits. */ @@ -2042,9 +2046,11 @@ re_compile_pattern(pattern, size, bufp) break; case 'Z': - BUFPUSH(endbuf2); - break; - + if ((bufp->options & RE_OPTION_POSIXLINE) == 0) { + BUFPUSH(endbuf2); + break; + } + /* fall through */ case 'z': BUFPUSH(endbuf); break; @@ -403,6 +403,7 @@ void rb_p _((VALUE)); VALUE rb_eval_string _((const char*)); VALUE rb_eval_string_protect _((const char*, int*)); +VALUE rb_eval_string_wrap _((const char*, int*)); VALUE rb_funcall __((VALUE, ID, int, ...)); int rb_scan_args __((int, VALUE*, const char*, ...)); @@ -413,6 +413,7 @@ VALUE rb_str_concat(str1, str2) VALUE str1, str2; { + rb_str_modify(str1); if (FIXNUM_P(str2)) { int i = FIX2INT(str2); if (0 <= i && i <= 0xff) { /* byte */ @@ -1,2 +1,2 @@ #define RUBY_VERSION "1.3.3" -#define RUBY_RELEASE_DATE "1999-05-07" +#define RUBY_RELEASE_DATE "1999-05-13" |