Mercurial > audlegacy
changeset 468:ac535d1224b5 trunk
[svn] use labs() instead of abs() for long types
author | giacomo |
---|---|
date | Wed, 18 Jan 2006 14:03:32 -0800 |
parents | bd423985b2cf |
children | fc98032223d1 |
files | audacious/mainwin.c |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/audacious/mainwin.c Wed Jan 18 13:55:23 2006 -0800 +++ b/audacious/mainwin.c Wed Jan 18 14:03:32 2006 -0800 @@ -1948,7 +1948,7 @@ delta_time.tv_usec = now_time.tv_usec - cb_time.tv_usec; delta_time.tv_sec = now_time.tv_sec - cb_time.tv_sec; - now_dur = abs((delta_time.tv_sec * 1000) + (glong) (delta_time.tv_usec / 1000)); + now_dur = labs((delta_time.tv_sec * 1000) + (glong) (delta_time.tv_usec / 1000)); if ( now_dur <= 150 ) { @@ -1985,7 +1985,7 @@ delta_time.tv_usec = now_time.tv_usec - cb_time.tv_usec; delta_time.tv_sec = now_time.tv_sec - cb_time.tv_sec; - now_dur = abs((delta_time.tv_sec * 1000) + (glong) (delta_time.tv_usec / 1000)); + now_dur = labs((delta_time.tv_sec * 1000) + (glong) (delta_time.tv_usec / 1000)); if ( now_dur <= 150 ) { @@ -3379,21 +3379,21 @@ { GTimeVal now_time; GTimeVal delta_time; - glong now_dur; + gulong now_dur; g_get_current_time(&now_time); delta_time.tv_usec = now_time.tv_usec - cb_time.tv_usec; delta_time.tv_sec = now_time.tv_sec - cb_time.tv_sec; - now_dur = abs((delta_time.tv_sec * 1000) + (glong) (delta_time.tv_usec / 1000)); + now_dur = labs((delta_time.tv_sec * 1000) + (glong) (delta_time.tv_usec / 1000)); if ( now_dur > 150 ) { gint np; if (seek_state == MAINWIN_SEEK_REV) - np = seek_initial_pos - abs((int)(now_dur/100)); /* seek back */ + np = seek_initial_pos - labs((gulong)(now_dur/100)); /* seek back */ else - np = seek_initial_pos + abs((int)(now_dur/100)); /* seek forward */ + np = seek_initial_pos + labs((gulong)(now_dur/100)); /* seek forward */ /* boundaries check */ if (np < 0 )