Fix indentation in time.c

Move stack-len info from main.c to gc.c


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
michal 2004-06-23 12:59:01 +00:00
parent 5199bf7529
commit cdf40ecbd8
4 changed files with 278 additions and 283 deletions

View File

@ -1,3 +1,12 @@
Wed Jun 23 21:48:27 2004 Michal Rokos <michal@cvs-lang.org>
* time.c: Fix indentation.
* main.c: Remove _stklen, and _CRT_glob. Move _stacksize for
__human68k__ to gc.c where the others are.
* gc.c: put _stacksize in place and clean the #ifdefs macros.
Wed Jun 23 17:37:54 2004 Shugo Maeda <shugo@ruby-lang.org> Wed Jun 23 17:37:54 2004 Shugo Maeda <shugo@ruby-lang.org>
* lib/net/imap.rb: added new option --ssl. * lib/net/imap.rb: added new option --ssl.

10
gc.c
View File

@ -407,19 +407,15 @@ VALUE *rb_gc_stack_start = 0;
#if defined(DJGPP) || defined(_WIN32_WCE) #if defined(DJGPP) || defined(_WIN32_WCE)
static unsigned int STACK_LEVEL_MAX = 65535; static unsigned int STACK_LEVEL_MAX = 65535;
#else #elif defined(__human68k__)
#ifdef __human68k__ unsigned int _stacksize = 262144;
extern unsigned int _stacksize;
# define STACK_LEVEL_MAX (_stacksize - 4096) # define STACK_LEVEL_MAX (_stacksize - 4096)
# undef HAVE_GETRLIMIT # undef HAVE_GETRLIMIT
#else #elif defined(HAVE_GETRLIMIT)
#ifdef HAVE_GETRLIMIT
static unsigned int STACK_LEVEL_MAX = 655300; static unsigned int STACK_LEVEL_MAX = 655300;
#else #else
# define STACK_LEVEL_MAX 655300 # define STACK_LEVEL_MAX 655300
#endif #endif
#endif
#endif
#ifdef C_ALLOCA #ifdef C_ALLOCA
# define SET_STACK_END VALUE stack_end; alloca(0); # define SET_STACK_END VALUE stack_end; alloca(0);

12
main.c
View File

@ -12,18 +12,6 @@
#include "ruby.h" #include "ruby.h"
#ifdef DJGPP
unsigned int _stklen = 0x180000;
#endif
#ifdef __human68k__
int _stacksize = 262144;
#endif
#if defined __MINGW32__
int _CRT_glob = 0;
#endif
#if defined(__MACOS__) && defined(__MWERKS__) #if defined(__MACOS__) && defined(__MWERKS__)
#include <console.h> #include <console.h>
#endif #endif

18
time.c
View File

@ -376,10 +376,8 @@ time_arg(argc, argv, tm, usec)
tm->tm_min = NIL_P(v[4])?0:obj2long(v[4]); tm->tm_min = NIL_P(v[4])?0:obj2long(v[4]);
tm->tm_sec = NIL_P(v[5])?0:obj2long(v[5]); tm->tm_sec = NIL_P(v[5])?0:obj2long(v[5]);
if (!NIL_P(v[6])) { if (!NIL_P(v[6])) {
if (argc == 8) { /* when argc == 8, v[6] is timezone, but ignored */
/* v[6] is timezone, but ignored */ if (argc == 7) {
}
else if (argc == 7) {
*usec = obj2long(v[6]); *usec = obj2long(v[6]);
} }
} }
@ -672,7 +670,8 @@ search_time_t(tptr, utc_p)
if (tm) { if (tm) {
if (tptr->tm_hour != (tm->tm_hour + 2) % 24 || if (tptr->tm_hour != (tm->tm_hour + 2) % 24 ||
tptr->tm_min != tm->tm_min || tptr->tm_min != tm->tm_min ||
tptr->tm_sec != tm->tm_sec) { tptr->tm_sec != tm->tm_sec
) {
guess2 -= (tm->tm_hour - tptr->tm_hour) * 60 * 60 + guess2 -= (tm->tm_hour - tptr->tm_hour) * 60 * 60 +
(tm->tm_min - tptr->tm_min) * 60 + (tm->tm_min - tptr->tm_min) * 60 +
(tm->tm_sec - tptr->tm_sec); (tm->tm_sec - tptr->tm_sec);
@ -696,7 +695,8 @@ search_time_t(tptr, utc_p)
if (tm) { if (tm) {
if ((tptr->tm_hour + 2) % 24 != tm->tm_hour || if ((tptr->tm_hour + 2) % 24 != tm->tm_hour ||
tptr->tm_min != tm->tm_min || tptr->tm_min != tm->tm_min ||
tptr->tm_sec != tm->tm_sec) { tptr->tm_sec != tm->tm_sec
) {
guess2 -= (tm->tm_hour - tptr->tm_hour) * 60 * 60 + guess2 -= (tm->tm_hour - tptr->tm_hour) * 60 * 60 +
(tm->tm_min - tptr->tm_min) * 60 + (tm->tm_min - tptr->tm_min) * 60 +
(tm->tm_sec - tptr->tm_sec); (tm->tm_sec - tptr->tm_sec);
@ -761,7 +761,8 @@ make_time_t(tptr, utc_p)
tptr->tm_mday == tmp->tm_mday && tptr->tm_mday == tmp->tm_mday &&
tptr->tm_hour == tmp->tm_hour && tptr->tm_hour == tmp->tm_hour &&
tptr->tm_min == tmp->tm_min && tptr->tm_min == tmp->tm_min &&
tptr->tm_sec == tmp->tm_sec) tptr->tm_sec == tmp->tm_sec
)
return t; return t;
#endif #endif
#endif #endif
@ -778,7 +779,8 @@ make_time_t(tptr, utc_p)
tptr->tm_mday == tmp->tm_mday && tptr->tm_mday == tmp->tm_mday &&
tptr->tm_hour == tmp->tm_hour && tptr->tm_hour == tmp->tm_hour &&
tptr->tm_min == tmp->tm_min && tptr->tm_min == tmp->tm_min &&
tptr->tm_sec == tmp->tm_sec) tptr->tm_sec == tmp->tm_sec
)
return t; return t;
#endif #endif
#endif #endif