[nas] [patch] remove unused functions, more () -> (void)
Stefan Huehner
stefan at huehner.org
Sat Aug 26 13:31:44 MDT 2006
Hi,
attached patch removed the 2 unused functions:
- server/dia/dispatch.c: void UpdateCurrentTime()
- server/dia/dixutils.c: TimeStamp ClientTimeToServerTime
and it changes one more occurence of () to (void).
Please check and consider applying.
Regards,
Stefan
-------------- next part --------------
Index: server/include/dixstruct.h
===================================================================
--- server/include/dixstruct.h (revision 184)
+++ server/include/dixstruct.h (working copy)
@@ -79,8 +79,6 @@
extern TimeStamp currentTime;
extern void CloseDownClient();
-extern TimeStamp ClientTimeToServerTime();
-extern void UpdateCurrentTime();
-extern void UpdateCurrentTimeIf();
+extern void UpdateCurrentTimeIf(void);
#endif /* DIXSTRUCT_H */
Index: server/dia/dispatch.c
===================================================================
--- server/dia/dispatch.c (revision 184)
+++ server/dia/dispatch.c (working copy)
@@ -96,26 +96,9 @@
*/
AuID clientErrorValue; /* XXX this is a kludge */
-void
-UpdateCurrentTime()
-{
- TimeStamp systime;
-
- /* To avoid time running backwards, we must call GetTimeInMillis before
- * calling ProcessInputEvents.
- */
- systime.months = currentTime.months;
- systime.milliseconds = GetTimeInMillis();
- if (systime.milliseconds < currentTime.milliseconds)
- systime.months++;
- ProcessAudioEvents();
- if (CompareTimeStamps(systime, currentTime) == LATER)
- currentTime = systime;
-}
-
/* Like UpdateCurrentTime, but can't call ProcessInputEvents */
void
-UpdateCurrentTimeIf()
+UpdateCurrentTimeIf(void)
{
TimeStamp systime;
Index: server/dia/dixutils.c
===================================================================
--- server/dia/dixutils.c (revision 184)
+++ server/dia/dixutils.c (working copy)
@@ -73,31 +73,6 @@
return SAMETIME;
}
-#ifdef junk
-/*
- * convert client times to server TimeStamps
- */
-
-#define HALFMONTH ((unsigned long) 1<<31)
-TimeStamp
-ClientTimeToServerTime(CARD32 c)
-{
- TimeStamp ts;
- if (c == CurrentTime)
- return currentTime;
- ts.months = currentTime.months;
- ts.milliseconds = c;
- if (c > currentTime.milliseconds) {
- if (((unsigned long) c - currentTime.milliseconds) > HALFMONTH)
- ts.months -= 1;
- } else if (c < currentTime.milliseconds) {
- if (((unsigned long) currentTime.milliseconds - c) > HALFMONTH)
- ts.months += 1;
- }
- return ts;
-}
-#endif /* junk */
-
/* No-op Don't Do Anything : sometimes we need to be able to call a procedure
* that doesn't do anything. For example, on screen with only static
* colormaps, if someone calls install colormap, it's easier to have a dummy
More information about the Nas
mailing list