Skip to content

Commit

Permalink
19991004
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
matz committed Oct 4, 1999
1 parent 960c033 commit 52d1245
Show file tree
Hide file tree
Showing 20 changed files with 125 additions and 65 deletions.
22 changes: 22 additions & 0 deletions ChangeLog
@@ -1,3 +1,25 @@
Mon Oct 4 12:42:32 1999 Kazuhiko Izawa <izawa@erec.che.tohoku.ac.jp>

* pack.c (pack_unpack): % in printf format should be %%.

Mon Oct 4 10:01:40 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* variable.c (rb_obj_instance_variables): should always return
array for all object can have instance variables now.

Mon Oct 4 00:08:34 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* pack.c (OFF16): need to adjust pointer address to pack/unpack on
64bit machines.

Sun Oct 03 03:05:59 1999 WATANABE Hirofumi <eban@os.rim.or.jp>

* time.c (time_arg): mktime y2k problem.

Sun Sep 26 16:54:45 1999 WATANABE Hirofumi <eban@os.rim.or.jp>

* parse.y (here_document): `\r' handling for here documents.

Wed Sep 22 09:20:11 1999 Masahiro Tomita <tommy@tmtm.org>

* ext/socket/socket.c: SOCKS5 support.
Expand Down
14 changes: 7 additions & 7 deletions Makefile.in
Expand Up @@ -38,7 +38,7 @@ LIBRUBY_ALIASES= @LIBRUBY_ALIASES@
LIBRUBY = @LIBRUBY@
LIBRUBYARG = @LIBRUBYARG@

EXTOBJS =
EXTOBJS = dmyext.@OBJEXT@

MAINOBJ = main.@OBJEXT@

Expand Down Expand Up @@ -83,20 +83,20 @@ OBJS = array.@OBJEXT@ \
all: miniruby$(EXEEXT) rbconfig.rb
@./miniruby$(EXEEXT) -Xext extmk.rb @EXTSTATIC@

miniruby$(EXEEXT): config.status $(LIBRUBY_A) $(MAINOBJ) dmyext.@OBJEXT@
miniruby$(EXEEXT): config.status $(LIBRUBY_A) $(MAINOBJ) $(EXTOBJS)
@rm -f $@
$(PURIFY) $(CC) $(LDFLAGS) $(MAINOBJ) dmyext.@OBJEXT@ $(LIBRUBY_A) $(LIBS) -o $@
$(PURIFY) $(CC) $(LDFLAGS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBY_A) $(LIBS) -o $@

$(PROGRAM): $(LIBRUBY) $(MAINOBJ) $(EXTOBJS)
@rm -f $@
$(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(LIBS) -o $@

$(LIBRUBY_A): $(OBJS) dmyext.@OBJEXT@
@AR@ rcu $@ $(OBJS) dmyext.@OBJEXT@
$(LIBRUBY_A): $(OBJS)
@AR@ rcu $@ $(OBJS)
@-@RANLIB@ $@ 2> /dev/null || true

$(LIBRUBY_SO): $(OBJS) dmyext.@OBJEXT@
$(LDSHARED) $(DLDFLAGS) $(SOLIBS) $(OBJS) dmyext.@OBJEXT@ -o $@
$(LIBRUBY_SO): $(OBJS)
$(LDSHARED) $(DLDFLAGS) $(SOLIBS) $(OBJS) -o $@
@-./miniruby -e 'ARGV.each{|link| File.delete link if File.exist? link; \
File.symlink "$(LIBRUBY_SO)", link}' \
$(LIBRUBY_ALIASES) || true
Expand Down
7 changes: 5 additions & 2 deletions README.EXT
Expand Up @@ -892,7 +892,6 @@ Sets the value of the instance variable.
Calls the function func1, supplying func2 as the block. func1 will be
called with the argument arg1. func2 receives the value from yield as
the first argument, arg2 as the second argument.


VALUE rb_yield(VALUE val)

Expand Down Expand Up @@ -942,10 +941,14 @@ exception handling nor ensure execution will be done.

The embedding API are below (not needed for extension libraries):

void ruby_init(int argc, char **argv, char **envp)
void ruby_init()

Initializes the interpreter.

void ruby_options(int argc, char **argv)

Process command line arguments for the interpreter.

void ruby_run()

Starts execution of the interpreter.
Expand Down
10 changes: 7 additions & 3 deletions README.EXT.jp
Expand Up @@ -245,8 +245,8 @@ Ruby
���饹��⥸�塼���¾�Υ��饹�������˥ͥ��Ȥ�������������
�ϰʲ��δؿ���Ȥ��ޤ���

VALUE rb_define_class(VALUE outer, char *name, VALUE super)
VALUE rb_define_module(VALUE outer, char *name)
VALUE rb_define_class_under(VALUE outer, char *name, VALUE super)
VALUE rb_define_module_under(VALUE outer, char *name)

2.1.2 �᥽�å�/�ðۥ᥽�å����

Expand Down Expand Up @@ -1099,10 +1099,14 @@ void rb_bug(char *fmt, ...)
Ruby�򥢥ץꥱ����������������ˤϰʲ��Υ��󥿥ե�����
��Ȥ����̾�γ�ĥ�饤�֥��ˤ�ɬ�פʤ���

void ruby_init(int argc, char **argv, char **envp)
void ruby_init()

Ruby���󥿥ץ꥿�ν������Ԥʤ���

void ruby_options(int argc, char **argv)

Ruby���󥿥ץ꥿�Υ��ޥ�ɥ饤������ν�����Ԥʤ���

void ruby_run()

Ruby���󥿥ץ꥿��¹Ԥ��롥
Expand Down
2 changes: 1 addition & 1 deletion README.jp
Expand Up @@ -136,7 +136,7 @@ UNIX
* ���۾��

Ruby�ϥե꡼���եȥ������Ǥ���GPL(the GNU General Public
Licence)�ޤ��ϰʲ��˼�������Ruby������ۤǤ��ޤ���GPL�ˤ�
License)�ޤ��ϰʲ��˼�������Ruby������ۤǤ��ޤ���GPL�ˤ�
���Ƥ�COPYING�ե�����򻲾Ȥ��Ʋ�������

1. ʣ�������¤ʤ���ͳ�Ǥ���
Expand Down
1 change: 1 addition & 0 deletions ToDo
Expand Up @@ -15,6 +15,7 @@ Language Spec.

Hacking Interpreter

* RUBYOPT environment variable
* non-blocking open (e.g. named pipe) for thread
* avoid blocking with gethostbyname/gethostbyaddr
* objectify interpreters
Expand Down
7 changes: 3 additions & 4 deletions eval.c
Expand Up @@ -1185,9 +1185,9 @@ rb_eval_string_wrap(str, state)
POP_CLASS();
if (state) {
*state = status;
if (status) {
JUMP_TAG(status);
}
}
else if (status) {
JUMP_TAG(status);
}
return val;
}
Expand Down Expand Up @@ -6414,7 +6414,6 @@ rb_thread_schedule()
fd_set readfds;
struct timeval delay_tv, *delay_ptr;
double delay, now; /* OK */

int n, max;

do {
Expand Down
2 changes: 1 addition & 1 deletion ext/nkf/nkf.c
Expand Up @@ -10,7 +10,7 @@

#undef getc
#undef ungetc
#define getc(f) (input_ctr>i_len?-1:input[input_ctr++])
#define getc(f) (input_ctr<i_len?input[input_ctr++]:-1)
#define ungetc(c,f) input_ctr--

#undef putchar
Expand Down
3 changes: 2 additions & 1 deletion ext/nkf/nkf1.7/nkf.c
Expand Up @@ -871,7 +871,7 @@ kanji_convert(f)
} else if(c1 == SO) {
shift_mode = TRUE;
NEXT;
} else if(c1 == ESC ) {
} else if(c1 == ESC) {
if((c1 = GETC(f)) == EOF) {
(*oconv)(0, ESC);
LAST;
Expand Down Expand Up @@ -1826,6 +1826,7 @@ reinit()
file_out = FALSE;
add_cr = FALSE;
del_cr = FALSE;
line = 0;
}

#ifndef PERL_XS
Expand Down
4 changes: 4 additions & 0 deletions ext/socket/getaddrinfo.c
Expand Up @@ -67,6 +67,10 @@
#include <stddef.h>
#include <ctype.h>

#ifdef SOCKS5
#include <socks.h>
#endif

#include "config.h"
#include "addrinfo.h"
#include "sockport.h"
Expand Down
4 changes: 4 additions & 0 deletions ext/socket/getnameinfo.c
Expand Up @@ -56,6 +56,10 @@
#include <string.h>
#include <stddef.h>

#ifdef SOCKS5
#include <socks.h>
#endif

#include "config.h"
#include "addrinfo.h"
#include "sockport.h"
Expand Down
17 changes: 17 additions & 0 deletions ext/socket/socket.c
Expand Up @@ -780,6 +780,20 @@ socks_s_open(class, host, serv)
Check_SafeStr(host);
return open_inet(class, host, serv, INET_SOCKS);
}

#ifdef SOCKS5
static VALUE
socks_s_close(sock)
VALUE sock;
{
OpenFile *fptr;

GetOpenFile(sock, fptr);
shutdown(fileno(fptr->f), 2);
shutdown(fileno(fptr->f2), 2);
return rb_io_close(sock);
}
#endif
#endif

/*
Expand Down Expand Up @@ -1876,6 +1890,9 @@ Init_socket()
rb_define_global_const("SOCKSsocket", rb_cSOCKSSocket);
rb_define_singleton_method(rb_cSOCKSSocket, "open", socks_s_open, 2);
rb_define_singleton_method(rb_cSOCKSSocket, "new", socks_s_open, 2);
#ifdef SOCKS5
rb_define_method(rb_cSOCKSSocket, "close", socks_s_close, 0);
#endif
#endif

rb_cTCPServer = rb_define_class("TCPServer", rb_cTCPSocket);
Expand Down
7 changes: 3 additions & 4 deletions misc/ruby-mode.el
Expand Up @@ -576,12 +576,11 @@ An end of a defun is found by moving forward from the beginning of one."

(defun ruby-reindent-then-newline-and-indent ()
(interactive "*")
(save-excursion
(delete-region (point) (progn (skip-chars-backward " \t") (point))))
(newline)
(save-excursion
(forward-line -1)
(indent-according-to-mode))
(end-of-line 0)
(indent-according-to-mode)
(delete-region (point) (progn (skip-chars-backward " \t") (point))))
(indent-according-to-mode))

(fset 'ruby-encomment-region (symbol-function 'comment-region))
Expand Down
2 changes: 2 additions & 0 deletions misc/rubydb3x.el
Expand Up @@ -108,6 +108,8 @@ and source-file directory for your debugger."
(gud-def gud-print "p %e" "\C-p" "Evaluate ruby expression at point.")

(setq comint-prompt-regexp "^(rdb:-) ")
(if (boundp 'comint-last-output-start)
(set-marker comint-last-output-start (point)))
(set (make-local-variable 'paragraph-start) comint-prompt-regexp)
(run-hooks 'rubydb-mode-hook)
)
1 change: 1 addition & 0 deletions missing/strftime.c
Expand Up @@ -425,6 +425,7 @@ strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr)
*/
off = -(daylight ? timezone : altzone) / 60;
#else /* !HAVE_TZNAME */
gettimeofday(&tv, &zone);
off = -zone.tz_minuteswest;
#endif /* !HAVE_TZNAME */
#endif /* !HAVE_TM_ZONE */
Expand Down

0 comments on commit 52d1245

Please sign in to comment.