diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | config.sub | 2 | ||||
-rw-r--r-- | configure | 2 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | ext/curses/curses.c | 40 | ||||
-rw-r--r-- | ext/socket/getaddrinfo.c | 10 | ||||
-rw-r--r-- | ext/socket/getnameinfo.c | 9 | ||||
-rw-r--r-- | string.c | 143 | ||||
-rw-r--r-- | version.h | 4 |
9 files changed, 91 insertions, 126 deletions
@@ -1,8 +1,3 @@ -Mon Jan 31 15:24:58 2000 Yukihiro Matsumoto <matz@netlab.co.jp> - - * string.c (rb_str_sub): no bang method returns original string if - no change is made. - Wed Jan 26 22:30:47 2000 Shigeo Kobayashi <shigeo@tinyforest.gr.jp> * numeric.c (flo_modulo): wrong result for negative modulo. diff --git a/config.sub b/config.sub index aa2241272b..c07e5d5cba 100644 --- a/config.sub +++ b/config.sub @@ -178,7 +178,7 @@ case $basic_machine in | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ - | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ + | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0* | hppa2.0w-* \ | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \ | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ @@ -4019,7 +4019,7 @@ EOF fi -case "$target_os" in +case "$host_os" in linux*) if test "$rb_cv_binary_elf" = no; then with_dln_a_out=yes diff --git a/configure.in b/configure.in index fbf6778bf0..0ebb1e7eaa 100644 --- a/configure.in +++ b/configure.in @@ -356,7 +356,7 @@ if test "$rb_cv_binary_elf" = yes; then AC_DEFINE(USE_ELF) fi -case "$target_os" in +case "$host_os" in linux*) if test "$rb_cv_binary_elf" = no; then with_dln_a_out=yes diff --git a/ext/curses/curses.c b/ext/curses/curses.c index 202a0f9244..b0e2ef5bc7 100644 --- a/ext/curses/curses.c +++ b/ext/curses/curses.c @@ -407,50 +407,50 @@ curses_cols() /*-------------------------- class Window --------------------------*/ -/* def new(lines, cols, top, left) */ +/* def new(h, w, top, left) */ static VALUE -window_s_new(class, lines, cols, top, left) +window_s_new(class, h, w, top, left) VALUE class; - VALUE lines; - VALUE cols; + VALUE h; + VALUE w; VALUE top; VALUE left; { - VALUE w; + VALUE win; WINDOW *window; VALUE args[4]; - window = newwin(NUM2INT(lines), NUM2INT(cols), NUM2INT(top), NUM2INT(left)); + window = newwin(NUM2INT(h), NUM2INT(w), NUM2INT(top), NUM2INT(left)); wclear(window); - w = prep_window(class, window); - args[0] = lines; args[1] = cols; args[2] = top; args[3] = left; - rb_obj_call_init(w, 4, args); + win = prep_window(class, window); + args[0] = h; args[1] = w; args[2] = top; args[3] = left; + rb_obj_call_init(win, 4, args); - return w; + return win; } -/* def subwin(lines, cols, top, left) */ +/* def subwin(h, w, top, left) */ static VALUE -window_subwin(obj, lines, cols, top, left) +window_subwin(obj, h, w, top, left) VALUE obj; - VALUE lines; - VALUE cols; + VALUE h; + VALUE w; VALUE top; VALUE left; { struct windata *winp; WINDOW *window; - VALUE w; + VALUE win; VALUE args[4]; GetWINDOW(obj, winp); - window = subwin(winp->window, NUM2INT(lines), NUM2INT(cols), + window = subwin(winp->window, NUM2INT(h), NUM2INT(w), NUM2INT(top), NUM2INT(left)); - w = prep_window(cWindow, window); - args[0] = lines; args[1] = cols; args[2] = top; args[3] = left; - rb_obj_call_init(w, 4, args); + win = prep_window(cWindow, window); + args[0] = h; args[1] = w; args[2] = top; args[3] = left; + rb_obj_call_init(win, 4, args); - return w; + return win; } /* def close */ diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c index ebb03fe959..d89c7851be 100644 --- a/ext/socket/getaddrinfo.c +++ b/ext/socket/getaddrinfo.c @@ -130,6 +130,11 @@ static struct afd { #define PTON_MAX 4 #endif +#ifndef INET6 +#ifndef NT +extern int h_errno; +#endif +#endif static int get_name __P((const char *, struct afd *, struct addrinfo **, char *, struct addrinfo *, @@ -575,11 +580,6 @@ get_addr(hostname, af, res, pai, port0) struct afd *afd; int i, error = 0, h_error; char *ap; -#ifndef INET6 -#ifndef NT - extern int h_errno; -#endif -#endif top = NULL; sentinel.ai_next = NULL; diff --git a/ext/socket/getnameinfo.c b/ext/socket/getnameinfo.c index cb65e4c070..6a71d1d6f6 100644 --- a/ext/socket/getnameinfo.c +++ b/ext/socket/getnameinfo.c @@ -64,6 +64,12 @@ #include "addrinfo.h" #include "sockport.h" +#ifndef INET6 +#ifndef NT +extern int h_errno; +#endif +#endif + #define SUCCESS 0 #define ANY 0 #define YES 1 @@ -149,9 +155,6 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags) int h_error; char numserv[512]; char numaddr[512]; -#ifndef NT - extern int h_errno; -#endif if (sa == NULL) return ENI_NOSOCKET; @@ -1043,11 +1043,9 @@ rb_str_sub(argc, argv, str) VALUE *argv; VALUE str; { - VALUE dup = rb_str_dup(str); - - if (NIL_P(rb_str_sub_bang(argc, argv, dup))) - return str; - return dup; + str = rb_str_dup(str); + rb_str_sub_bang(argc, argv, str); + return str; } static VALUE @@ -1151,11 +1149,10 @@ rb_str_gsub(argc, argv, str) VALUE *argv; VALUE str; { - VALUE dup = rb_str_dup(str); + str = rb_str_dup(str); - if (NIL_P(rb_str_gsub_bang(argc, argv, dup))) - return str; - return dup; + rb_str_gsub_bang(argc, argv, dup); + return str; } static VALUE @@ -1197,13 +1194,11 @@ rb_f_sub(argc, argv) int argc; VALUE *argv; { - VALUE line = uscore_get(); - VALUE dup = rb_str_dup(line); + VALUE str = rb_str_dup(uscore_get()); - if (NIL_P(rb_str_sub_bang(argc, argv, dup))) - return line; - rb_lastline_set(dup); - return dup; + rb_str_sub_bang(argc, argv, str); + rb_lastline_set(str); + return str; } static VALUE @@ -1219,13 +1214,11 @@ rb_f_gsub(argc, argv) int argc; VALUE *argv; { - VALUE line = uscore_get(); - VALUE dup = rb_str_dup(line); + VALUE str = rb_str_dup(uscore_get()); - if (NIL_P(rb_str_gsub_bang(argc, argv, dup))) - return line; - rb_lastline_set(dup); - return dup; + rb_str_gsub_bang(argc, argv, str); + rb_lastline_set(str); + return str; } static VALUE @@ -1520,11 +1513,9 @@ static VALUE rb_str_upcase(str) VALUE str; { - VALUE dup = rb_str_dup(str); - - if (NIL_P(rb_str_upcase_bang(dup))) - return str; - return dup; + str = rb_str_dup(str); + rb_str_upcase_bang(str); + return str; } static VALUE @@ -1555,11 +1546,9 @@ static VALUE rb_str_downcase(str) VALUE str; { - VALUE dup = rb_str_dup(str); - - if (NIL_P(rb_str_downcase_bang(dup))) - return str; - return dup; + str = rb_str_dup(str); + rb_str_downcase_bang(str); + return str; } static VALUE @@ -1592,11 +1581,9 @@ static VALUE rb_str_capitalize(str) VALUE str; { - VALUE dup = rb_str_dup(str); - - if (NIL_P(rb_str_capitalize_bang(dup))) - return str; - return dup; + str = rb_str_dup(str); + rb_str_capitalize_bang(str); + return str; } static VALUE @@ -1631,11 +1618,9 @@ static VALUE rb_str_swapcase(str) VALUE str; { - VALUE dup = rb_str_dup(str); - - if (NIL_P(rb_str_swapcase_bang(dup))) - return str; - return dup; + str = rb_str_dup(str); + rb_str_swapcase_bang(str); + return str; } typedef unsigned char *USTR; @@ -1783,11 +1768,9 @@ static VALUE rb_str_tr(str, src, repl) VALUE str, src, repl; { - VALUE dup = rb_str_dup(str); - - if (NIL_P(tr_trans(dup, src, repl, 0))) - return str; - return dup; + str = rb_str_dup(str); + tr_trans(str, src, repl, 0); + return str; } static void @@ -1868,11 +1851,9 @@ rb_str_delete(argc, argv, str) VALUE *argv; VALUE str; { - VALUE dup = rb_str_dup(str); - - if (NIL_P(rb_str_delete_bang(argc, argv, dup))) - return str; - return dup; + str = rb_str_dup(str); + rb_str_delete_bang(argc, argv, str); + return str; } static VALUE @@ -1930,11 +1911,9 @@ rb_str_squeeze(argc, argv, str) VALUE *argv; VALUE str; { - VALUE dup = rb_str_dup(str); - - if (NIL_P(rb_str_squeeze_bang(argc, argv, dup))) - return str; - return dup; + str = rb_str_dup(str); + rb_str_squeeze_bang(argc, argv, str); + return str; } static VALUE @@ -1948,11 +1927,9 @@ static VALUE rb_str_tr_s(str, src, repl) VALUE str, src, repl; { - VALUE dup = rb_str_dup(str); - - if (NIL_P(tr_trans(dup, src, repl, 1))) - return str; - return dup; + str = rb_str_dup(str); + tr_trans(str, src, repl, 1); + return str; } static VALUE @@ -2241,11 +2218,9 @@ static VALUE rb_str_chop(str) VALUE str; { - VALUE dup = rb_str_dup(str); - - if (NIL_P(rb_str_chop_bang(dup))) - return str; - return dup; + str = rb_str_dup(str); + rb_str_chop_bang(str); + return str; } static VALUE @@ -2258,13 +2233,11 @@ rb_f_chop_bang(str) static VALUE rb_f_chop() { - VALUE str = uscore_get(); - VALUE dup = rb_str_dup(str); + VALUE str = rb_str_dup(uscore_get()); - if (NIL_P(rb_str_chop_bang(dup))) - return str; - rb_lastline_set(dup); - return dup; + rb_str_chop_bang(str); + rb_lastline_set(str); + return str; } static VALUE @@ -2316,11 +2289,9 @@ rb_str_chomp(argc, argv, str) VALUE *argv; VALUE str; { - VALUE dup = rb_str_dup(str); - - if (NIL_P(rb_str_chomp_bang(argc, argv, dup))) - return str; - return dup; + str = rb_str_dup(str); + rb_str_chomp_bang(argc, argv, str); + return str; } static VALUE @@ -2336,13 +2307,11 @@ rb_f_chomp(argc, argv) int argc; VALUE *argv; { - VALUE str = uscore_get(); - VALUE dup = rb_str_dup(str); + VALUE str = rb_str_dup(uscore_get()); - if (NIL_P(rb_str_chomp_bang(argc, argv, dup))) - return str; - rb_lastline_set(dup); - return dup; + rb_str_chomp_bang(argc, argv, str); + rb_lastline_set(str); + return str; } static VALUE @@ -2385,11 +2354,9 @@ static VALUE rb_str_strip(str) VALUE str; { - VALUE dup = rb_str_dup(str); - - if (NIL_P(rb_str_strip_bang(dup))) - return str; - return dup; + str = rb_str_dup(str); + rb_str_strip_bang(str); + return str; } static VALUE @@ -1,4 +1,4 @@ #define RUBY_VERSION "1.4.4" -#define RUBY_RELEASE_DATE "2000-02-01" +#define RUBY_RELEASE_DATE "2000-02-02" #define RUBY_VERSION_CODE 144 -#define RUBY_RELEASE_CODE 20000201 +#define RUBY_RELEASE_CODE 20000202 |