tabs->spaces

This commit is contained in:
Nils O. Selåsdal
2013-11-22 20:06:05 +01:00
parent e808bcde4d
commit 3d2e0ce540
31 changed files with 1214 additions and 1214 deletions
+16 -16
View File
@@ -3,29 +3,29 @@
struct timeval *
uc_tvadd(struct timeval *dst, const struct timeval *a, const struct timeval *b)
{
dst->tv_sec = a->tv_sec + b->tv_sec;
dst->tv_usec = a->tv_usec + b->tv_usec;
dst->tv_sec = a->tv_sec + b->tv_sec;
dst->tv_usec = a->tv_usec + b->tv_usec;
if (dst->tv_usec >= 1000000) {
dst->tv_sec++;
if (dst->tv_usec >= 1000000) {
dst->tv_sec++;
dst->tv_usec -= 1000000;
}
return dst;
return dst;
}
struct timeval *
uc_tvsub(struct timeval *dst, const struct timeval *a, const struct timeval *b)
{
dst->tv_sec = a->tv_sec - b->tv_sec;
dst->tv_usec = a->tv_usec - b->tv_usec;
dst->tv_sec = a->tv_sec - b->tv_sec;
dst->tv_usec = a->tv_usec - b->tv_usec;
if (dst->tv_usec < 0) {
dst->tv_sec--;
if (dst->tv_usec < 0) {
dst->tv_sec--;
dst->tv_usec += 1000000;
}
return dst;
return dst;
}
int
@@ -36,9 +36,9 @@ uc_tvcmp(const struct timeval *a, const struct timeval *b)
else if (a->tv_sec > b->tv_sec)
return 1;
if (a->tv_usec < b->tv_usec)
return -1;
else if (a->tv_usec > b->tv_usec)
if (a->tv_usec < b->tv_usec)
return -1;
else if (a->tv_usec > b->tv_usec)
return 1;
return 0;
@@ -47,9 +47,9 @@ uc_tvcmp(const struct timeval *a, const struct timeval *b)
struct timeval *
uc_ms2tv(struct timeval *dst, unsigned long long ms)
{
dst->tv_sec = ms / 1000;
dst->tv_usec = ms % 1000 * 1000;
dst->tv_sec = ms / 1000;
dst->tv_usec = ms % 1000 * 1000;
return dst;
return dst;
}