From d7b8616260f1012bdb011e4ac808eba9f0cf38aa Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 2 Feb 2000 08:10:32 +0000 Subject: 2000-02-02 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/curses/curses.c | 40 ++++++++++++++++++++-------------------- ext/socket/getaddrinfo.c | 10 +++++----- ext/socket/getnameinfo.c | 9 ++++++--- 3 files changed, 31 insertions(+), 28 deletions(-) (limited to 'ext') 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; -- cgit v1.2.3