ruby-changes:16588
From: akr <ko1@a...>
Date: Thu, 8 Jul 2010 22:05:51 +0900 (JST)
Subject: [ruby-changes:16588] Ruby:r28580 (trunk): unused code removed.
akr 2010-07-08 22:05:41 +0900 (Thu, 08 Jul 2010) New Revision: 28580 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=28580 Log: unused code removed. Modified files: trunk/strftime.c Index: strftime.c =================================================================== --- strftime.c (revision 28579) +++ strftime.c (revision 28580) @@ -515,21 +515,6 @@ continue; #ifdef MAILHEADER_EXT - /* - * From: Chip Rosenthal <chip@c...> - * Date: Sun, 19 Mar 1995 00:33:29 -0600 (CST) - * - * Warning: the %z [code] is implemented by inspecting the - * timezone name conditional compile settings, and - * inferring a method to get timezone offsets. I've tried - * this code on a couple of machines, but I don't doubt - * there is some system out there that won't like it. - * Maybe the easiest thing to do would be to bracket this - * with an #ifdef that can turn it off. The %z feature - * would be an admittedly obscure one that most folks can - * live without, but it would be a great help to those of - * us that muck around with various message processors. - */ case 'z': /* time zone offset east of GMT e.g. -0600 */ switch (colons) { case 0: /* %z -> +hhmm */ @@ -556,45 +541,6 @@ } else { off = NUM2LONG(rb_funcall(vtm->utc_offset, rb_intern("round"), 0)); -#if 0 -#ifdef HAVE_TM_NAME - /* - * Systems with tm_name probably have tm_tzadj as - * secs west of GMT. Convert to mins east of GMT. - */ - off = -timeptr->tm_tzadj / 60; -#else /* !HAVE_TM_NAME */ -#ifdef HAVE_TM_ZONE - /* - * Systems with tm_zone probably have tm_gmtoff as - * secs east of GMT. Convert to mins east of GMT. - */ - off = timeptr->tm_gmtoff / 60; -#else /* !HAVE_TM_ZONE */ -#if HAVE_VAR_TIMEZONE -#if HAVE_VAR_ALTZONE - off = -(daylight ? timezone : altzone) / 60; -#else - off = -timezone / 60; -#endif -#else /* !HAVE_VAR_TIMEZONE */ -#ifdef HAVE_GETTIMEOFDAY - gettimeofday(&tv, &zone); - off = -zone.tz_minuteswest; -#else - /* no timezone info, then calc by myself */ - { - struct tm utc; - time_t now; - time(&now); - utc = *gmtime(&now); - off = (long)((now - mktime(&utc)) / 60); - } -#endif -#endif /* !HAVE_VAR_TIMEZONE */ -#endif /* !HAVE_TM_ZONE */ -#endif /* !HAVE_TM_NAME */ -#endif /* 0 */ } if (off < 0) { off = -off; @@ -631,29 +577,6 @@ tp = "UTC"; break; } -#if 0 -#ifdef HAVE_TZNAME - i = (daylight && timeptr->tm_isdst > 0); /* 0 or 1 */ - tp = tzname[i]; -#else -#ifdef HAVE_TM_ZONE - tp = timeptr->tm_zone; -#else -#ifdef HAVE_TM_NAME - tp = timeptr->tm_name; -#else -#ifdef HAVE_TIMEZONE - gettimeofday(& tv, & zone); -#ifdef TIMEZONE_VOID - tp = timezone(); -#else - tp = timezone(zone.tz_minuteswest, timeptr->tm_isdst > 0); -#endif /* TIMEZONE_VOID */ -#endif /* HAVE_TIMEZONE */ -#endif /* HAVE_TM_NAME */ -#endif /* HAVE_TM_ZONE */ -#endif /* HAVE_TZNAME */ -#endif /* 0 */ if (vtm->zone == NULL) tp = ""; else -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/