summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-05-13 10:01:09 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-05-13 10:01:09 +0000
commitccc13869790d312f614128204c5546d5e9ad0b3f (patch)
tree4a834e153187f75cc2a336f742aea845f55557e6
parentc6ac6cb4542b845eb4c18a9e80e15f8deab4f54a (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--ChangeLog9
-rw-r--r--dln.c6
-rw-r--r--eval.c27
-rw-r--r--ext/Setup1
-rw-r--r--ext/pty/pty.c11
-rw-r--r--ext/socket/addrinfo.h2
-rw-r--r--regex.c22
-rw-r--r--ruby.h1
-rw-r--r--string.c1
-rw-r--r--version.h2
10 files changed, 65 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index 445aa4d..3f361fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Thu May 13 10:40:44 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * 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 <matz@netlab.co.jp>
* struct.c (iv_get): in case of inheritance of generated struct
diff --git a/dln.c b/dln.c
index 305512f..b41603c 100644
--- a/dln.c
+++ b/dln.c
@@ -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;
diff --git a/eval.c b/eval.c
index a6a028a..2d05ebe 100644
--- a/eval.c
+++ b/eval.c
@@ -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;
{
diff --git a/ext/Setup b/ext/Setup
index 830a509..957e910 100644
--- a/ext/Setup
+++ b/ext/Setup
@@ -1,5 +1,6 @@
#option nodynamic
+interbase
#GD
#curses
#dbm
diff --git a/ext/pty/pty.c b/ext/pty/pty.c
index 0995220..3748b55 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 5d2c7de..d4e2091 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
diff --git a/regex.c b/regex.c
index 0cd01b2..c6167b0 100644
--- a/regex.c
+++ b/regex.c
@@ -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;
diff --git a/ruby.h b/ruby.h
index 5f3d61e..3d36328 100644
--- a/ruby.h
+++ b/ruby.h
@@ -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*, ...));
diff --git a/string.c b/string.c
index 3732130..09c4944 100644
--- a/string.c
+++ b/string.c
@@ -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 */
diff --git a/version.h b/version.h
index 6120196..9ef5ddf 100644
--- a/version.h
+++ b/version.h
@@ -1,2 +1,2 @@
#define RUBY_VERSION "1.3.3"
-#define RUBY_RELEASE_DATE "1999-05-07"
+#define RUBY_RELEASE_DATE "1999-05-13"