summaryrefslogtreecommitdiffstats
path: root/nsprpub/pr/tests/parsetm.c
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-01-02 21:01:38 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-01-02 21:01:38 +0100
commitf7d30133221896638f7bf4f66c504255c4b14f48 (patch)
tree5f3e07a049f388a3a309a615b8884318f6668a98 /nsprpub/pr/tests/parsetm.c
parent26b297510a11758727438df4669357a2a2bc42ce (diff)
downloadUXP-f7d30133221896638f7bf4f66c504255c4b14f48.tar
UXP-f7d30133221896638f7bf4f66c504255c4b14f48.tar.gz
UXP-f7d30133221896638f7bf4f66c504255c4b14f48.tar.lz
UXP-f7d30133221896638f7bf4f66c504255c4b14f48.tar.xz
UXP-f7d30133221896638f7bf4f66c504255c4b14f48.zip
Issue #1338 - Part 1: Update NSPR to 4.24
Diffstat (limited to 'nsprpub/pr/tests/parsetm.c')
-rw-r--r--nsprpub/pr/tests/parsetm.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/nsprpub/pr/tests/parsetm.c b/nsprpub/pr/tests/parsetm.c
index be1fc4913..0e25ffe68 100644
--- a/nsprpub/pr/tests/parsetm.c
+++ b/nsprpub/pr/tests/parsetm.c
@@ -19,10 +19,11 @@
PRBool debug_mode = PR_TRUE;
static char *dayOfWeek[] =
- { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "???" };
+{ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "???" };
static char *month[] =
- { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "???" };
+{ "Jan", "Feb", "Mar", "Apr", "May", "Jun",
+ "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "???"
+};
static void PrintExplodedTime(const PRExplodedTime *et) {
PRInt32 totalOffset;
@@ -31,27 +32,32 @@ static void PrintExplodedTime(const PRExplodedTime *et) {
/* Print day of the week, month, day, hour, minute, and second */
if (debug_mode) printf("%s %s %ld %02ld:%02ld:%02ld ",
- dayOfWeek[et->tm_wday], month[et->tm_month], et->tm_mday,
- et->tm_hour, et->tm_min, et->tm_sec);
+ dayOfWeek[et->tm_wday], month[et->tm_month], et->tm_mday,
+ et->tm_hour, et->tm_min, et->tm_sec);
/* Print time zone */
totalOffset = et->tm_params.tp_gmt_offset + et->tm_params.tp_dst_offset;
if (totalOffset == 0) {
- if (debug_mode) printf("UTC ");
+ if (debug_mode) {
+ printf("UTC ");
+ }
} else {
sign = "+";
if (totalOffset < 0) {
- totalOffset = -totalOffset;
- sign = "-";
+ totalOffset = -totalOffset;
+ sign = "-";
}
hourOffset = totalOffset / 3600;
minOffset = (totalOffset % 3600) / 60;
- if (debug_mode)
+ if (debug_mode) {
printf("%s%02ld%02ld ", sign, hourOffset, minOffset);
+ }
}
/* Print year */
- if (debug_mode) printf("%hd", et->tm_year);
+ if (debug_mode) {
+ printf("%hd", et->tm_year);
+ }
}
int main(int argc, char **argv)