]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
time.c: Make declarations match definitions.
authorAndre Noll <maan@systemlinux.org>
Sat, 6 Jul 2013 13:02:10 +0000 (15:02 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 21 Jul 2013 19:44:25 +0000 (21:44 +0200)
Also fix some whitespace issues.

para.h
time.c

diff --git a/para.h b/para.h
index edab4871a03441dc1756054bfe0850b2a4e10c22..4de4af4a23dd0f0a6e225279f9e72423a027adc4 100644 (file)
--- a/para.h
+++ b/para.h
@@ -95,17 +95,20 @@ extern __printf_2_3 void (*para_log)(int, const char*, ...);
 int para_exec_cmdline_pid(pid_t *pid, const char *cmdline, int *fds);
 
 /* time */
 int para_exec_cmdline_pid(pid_t *pid, const char *cmdline, int *fds);
 
 /* time */
-int tv_diff(const struct timeval *b, const struct timeval *a, struct timeval *diff);
-long unsigned tv2ms(const struct timeval*);
-void d2tv(double, struct timeval*);
-void tv_add(const struct timeval*, const struct timeval *, struct timeval *);
-void tv_scale(const unsigned long, const struct timeval *, struct timeval *);
+int tv_diff(const struct timeval *b, const struct timeval *a,
+               struct timeval *diff);
+long unsigned tv2ms(const struct timeval *tv);
+void d2tv(double x, struct timeval *tv);
+void tv_add(const struct timeval *a, const struct timeval *b,
+               struct timeval *sum);
+void tv_scale(const unsigned long mult, const struct timeval *tv,
+               struct timeval *result);
 void tv_divide(const unsigned long divisor, const struct timeval *tv,
 void tv_divide(const unsigned long divisor, const struct timeval *tv,
-       struct timeval *result);
+               struct timeval *result);
 int tv_convex_combination(const long a, const struct timeval *tv1,
                const long b, const struct timeval *tv2,
                struct timeval *result);
 int tv_convex_combination(const long a, const struct timeval *tv1,
                const long b, const struct timeval *tv2,
                struct timeval *result);
-void ms2tv(const long unsigned n, struct timeval *tv);
+void ms2tv(long unsigned n, struct timeval *tv);
 void compute_chunk_time(long unsigned chunk_num,
                struct timeval *chunk_tv, struct timeval *stream_start,
                struct timeval *result);
 void compute_chunk_time(long unsigned chunk_num,
                struct timeval *chunk_tv, struct timeval *stream_start,
                struct timeval *result);
diff --git a/time.c b/time.c
index 6f6dd49e330df2f4d85565aa65ab1e02615abebd..fe431208d27130f452e0d61e7d801477730fbbfa 100644 (file)
--- a/time.c
+++ b/time.c
@@ -55,7 +55,8 @@ void d2tv(double x, struct timeval *tv)
  *
  * \return If \a b < \a a, this function returns -1, otherwise it returns 1.
  */
  *
  * \return If \a b < \a a, this function returns -1, otherwise it returns 1.
  */
-int tv_diff(const struct timeval *b, const struct timeval *a, struct timeval *diff)
+int tv_diff(const struct timeval *b, const struct timeval *a,
+               struct timeval *diff)
 {
        int ret = 1;
 
 {
        int ret = 1;
 
@@ -85,7 +86,7 @@ int tv_diff(const struct timeval *b, const struct timeval *a, struct timeval *di
  * \param sum Contains the sum \a a + \a b on return.
  */
 void tv_add(const struct timeval *a, const struct timeval *b,
  * \param sum Contains the sum \a a + \a b on return.
  */
 void tv_add(const struct timeval *a, const struct timeval *b,
-       struct timeval *sum)
+               struct timeval *sum)
 {
        sum->tv_sec = a->tv_sec + b->tv_sec;
        if (a->tv_usec + b->tv_usec >= 1000 * 1000) {
 {
        sum->tv_sec = a->tv_sec + b->tv_sec;
        if (a->tv_usec + b->tv_usec >= 1000 * 1000) {
@@ -104,7 +105,7 @@ void tv_add(const struct timeval *a, const struct timeval *b,
  * \param result Contains \a mult * \a tv on return.
  */
 void tv_scale(const unsigned long mult, const struct timeval *tv,
  * \param result Contains \a mult * \a tv on return.
  */
 void tv_scale(const unsigned long mult, const struct timeval *tv,
-       struct timeval *result)
+               struct timeval *result)
 {
        uint64_t x = ((uint64_t)tv->tv_sec * 1000 * 1000 + tv->tv_usec) * mult;
 
 {
        uint64_t x = ((uint64_t)tv->tv_sec * 1000 * 1000 + tv->tv_usec) * mult;
 
@@ -120,7 +121,7 @@ void tv_scale(const unsigned long mult, const struct timeval *tv,
  * \param result Contains (1 / mult) * tv on return.
  */
 void tv_divide(const unsigned long divisor, const struct timeval *tv,
  * \param result Contains (1 / mult) * tv on return.
  */
 void tv_divide(const unsigned long divisor, const struct timeval *tv,
-       struct timeval *result)
+               struct timeval *result)
 {
        uint64_t x = ((uint64_t)tv->tv_sec * 1000 * 1000 + tv->tv_usec) / divisor;
 
 {
        uint64_t x = ((uint64_t)tv->tv_sec * 1000 * 1000 + tv->tv_usec) / divisor;