mirror of
https://frontier.innolan.net/rainlance/amiga-tz.git
synced 2026-09-20 13:56:29 +00:00
SCCS-file: strftime.c
SCCS-SID: 7.73
This commit is contained in:
committed by
Paul Eggert
parent
40bf459d45
commit
f1c19fd915
+6
-9
@@ -618,24 +618,21 @@ const char * const ptlim;
|
||||
register int trail;
|
||||
|
||||
#define DIVISOR 100
|
||||
lead = a / DIVISOR + b / DIVISOR;
|
||||
trail = a % DIVISOR + b % DIVISOR;
|
||||
if (trail > DIVISOR) {
|
||||
trail -= DIVISOR;
|
||||
++lead;
|
||||
}
|
||||
while (trail < 0) {
|
||||
lead = a / DIVISOR + b / DIVISOR + trail / DIVISOR;
|
||||
trail %= DIVISOR;
|
||||
if (trail < 0 && lead > 0) {
|
||||
trail += DIVISOR;
|
||||
--lead;
|
||||
}
|
||||
if (lead < 0 && trail != 0) {
|
||||
} else if (lead < 0 && trail > 0) {
|
||||
trail -= DIVISOR;
|
||||
++lead;
|
||||
}
|
||||
if (convert_top)
|
||||
if (convert_top) {
|
||||
if (lead == 0 && trail < 0)
|
||||
pt = _add("-0", pt, ptlim);
|
||||
else pt = _conv(lead, "%02d", pt, ptlim);
|
||||
}
|
||||
if (convert_yy)
|
||||
pt = _conv(((trail < 0) ? -trail : trail), "%02d", pt, ptlim);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user