strftime.c: linux style
* strftime.c (rb_strftime_with_timespec): fix indentation using linux style. this file is not written in ruby-style. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1cb2f96158
commit
49479c2dcc
36
strftime.c
36
strftime.c
@ -450,35 +450,35 @@ rb_strftime_with_timespec(char *s, size_t maxsize, const char *format, rb_encodi
|
|||||||
|
|
||||||
case 'Y': /* year with century */
|
case 'Y': /* year with century */
|
||||||
if (FIXNUM_P(vtm->year)) {
|
if (FIXNUM_P(vtm->year)) {
|
||||||
long y = FIX2LONG(vtm->year);
|
long y = FIX2LONG(vtm->year);
|
||||||
FMT('0', 0 <= y ? 4 : 5, "ld", y);
|
FMT('0', 0 <= y ? 4 : 5, "ld", y);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
FMTV('0', 4, "d", vtm->year);
|
FMTV('0', 4, "d", vtm->year);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
#ifdef MAILHEADER_EXT
|
#ifdef MAILHEADER_EXT
|
||||||
case 'z': /* time zone offset east of GMT e.g. -0600 */
|
case 'z': /* time zone offset east of GMT e.g. -0600 */
|
||||||
switch (colons) {
|
switch (colons) {
|
||||||
case 0: /* %z -> +hhmm */
|
case 0: /* %z -> +hhmm */
|
||||||
precision = precision <= 5 ? 2 : precision-3;
|
precision = precision <= 5 ? 2 : precision-3;
|
||||||
NEEDS(precision + 3);
|
NEEDS(precision + 3);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1: /* %:z -> +hh:mm */
|
case 1: /* %:z -> +hh:mm */
|
||||||
precision = precision <= 6 ? 2 : precision-4;
|
precision = precision <= 6 ? 2 : precision-4;
|
||||||
NEEDS(precision + 4);
|
NEEDS(precision + 4);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2: /* %::z -> +hh:mm:ss */
|
case 2: /* %::z -> +hh:mm:ss */
|
||||||
precision = precision <= 9 ? 2 : precision-7;
|
precision = precision <= 9 ? 2 : precision-7;
|
||||||
NEEDS(precision + 7);
|
NEEDS(precision + 7);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
format--;
|
format--;
|
||||||
goto unknown;
|
goto unknown;
|
||||||
}
|
}
|
||||||
if (gmt) {
|
if (gmt) {
|
||||||
off = 0;
|
off = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user