diff options
author | aj <aj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-15 15:33:12 +0000 |
---|---|---|
committer | aj <aj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-15 15:33:12 +0000 |
commit | d5142e57e2c79ae7f28ae7b2a6dda2ad18dc5d69 (patch) | |
tree | 4fbbf0748f7bb16952937461e107a70dba0a10c3 /libgfortran/intrinsics | |
parent | 4caf14188c7d6a2d13d3f5e22952de68494110bd (diff) | |
download | gcc-d5142e57e2c79ae7f28ae7b2a6dda2ad18dc5d69.tar.gz |
* intrinsics/system_clock.c (system_clock_4, system_clock_8): Add
missing returns, reformat a bit.
* io/write.c (nml_write_obj): Use %d again - and cast to int,
st_sprintf does not handle %ld.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99722 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/intrinsics')
-rw-r--r-- | libgfortran/intrinsics/system_clock.c | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/libgfortran/intrinsics/system_clock.c b/libgfortran/intrinsics/system_clock.c index 1d6455831cf..17c7bb62097 100644 --- a/libgfortran/intrinsics/system_clock.c +++ b/libgfortran/intrinsics/system_clock.c @@ -1,5 +1,5 @@ /* Implementation of the SYSTEM_CLOCK intrinsic. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU Fortran 95 runtime library (libgfortran). @@ -104,9 +104,13 @@ system_clock_4(GFC_INTEGER_4 *count, GFC_INTEGER_4 *count_rate, } else { - if (count != NULL) *count = - GFC_INTEGER_4_HUGE; - if (count_rate != NULL) *count_rate = 0; - if (count_max != NULL) *count_max = 0; + if (count != NULL) + *count = - GFC_INTEGER_4_HUGE; + if (count_rate != NULL) + *count_rate = 0; + if (count_max != NULL) + *count_max = 0; + return; } #elif defined(HAVE_TIME_H) time_t t, t1; @@ -118,7 +122,7 @@ system_clock_4(GFC_INTEGER_4 *count, GFC_INTEGER_4 *count_rate, cnt = - GFC_INTEGER_4_HUGE; mx = 0; } - else if (t0 == (time_t) -2) + else if (t0 == (time_t) -2) t0 = t1; else { @@ -131,9 +135,12 @@ system_clock_4(GFC_INTEGER_4 *count, GFC_INTEGER_4 *count_rate, cnt = - GFC_INTEGER_4_HUGE; mx = 0; #endif - if (count != NULL) *count = cnt; - if (count_rate != NULL) *count_rate = TCK; - if (count_max != NULL) *count_max = mx; + if (count != NULL) + *count = cnt; + if (count_rate != NULL) + *count_rate = TCK; + if (count_max != NULL) + *count_max = mx; } @@ -180,9 +187,14 @@ system_clock_8 (GFC_INTEGER_8 *count, GFC_INTEGER_8 *count_rate, } else { - if (count != NULL) *count = - GFC_INTEGER_8_HUGE; - if (count_rate != NULL) *count_rate = 0; - if (count_max != NULL) *count_max = 0; + if (count != NULL) + *count = - GFC_INTEGER_8_HUGE; + if (count_rate != NULL) + *count_rate = 0; + if (count_max != NULL) + *count_max = 0; + + return; } #elif defined(HAVE_TIME_H) time_t t, t1; @@ -194,7 +206,7 @@ system_clock_8 (GFC_INTEGER_8 *count, GFC_INTEGER_8 *count_rate, cnt = - GFC_INTEGER_8_HUGE; mx = 0; } - else if (t0 == (time_t) -2) + else if (t0 == (time_t) -2) t0 = t1; else { |