Bug #10560: Code-Cleanup: function declarations () -> (void)

X.Org Bugzilla #10560: <https://bugs.freedesktop.org/show_bug.cgi?id=10560>
Patch #9511 <https://bugs.freedesktop.org/attachment.cgi?id=9511>
This commit is contained in:
Stefan Huehner 2007-04-09 14:33:15 -07:00 committed by Alan Coopersmith
parent f24391dbfd
commit 1f6741db19
23 changed files with 68 additions and 68 deletions

View File

@ -2509,7 +2509,7 @@ ServertimeBracketValues(pCounter, pbracket_less, pbracket_greater)
} }
static void static void
SyncInitServerTime() SyncInitServerTime(void)
{ {
CARD64 resolution; CARD64 resolution;

View File

@ -153,7 +153,7 @@ static int XvdiSendVideoNotify(XvPortPtr, DrawablePtr, int);
*/ */
void void
XvExtensionInit() XvExtensionInit(void)
{ {
ExtensionEntry *extEntry; ExtensionEntry *extEntry;
@ -205,7 +205,7 @@ XvExtensionInit()
} }
static Bool static Bool
CreateResourceTypes() CreateResourceTypes(void)
{ {
@ -335,13 +335,13 @@ XvResetProc(ExtensionEntry* extEntry)
} }
_X_EXPORT int _X_EXPORT int
XvGetScreenIndex() XvGetScreenIndex(void)
{ {
return XvScreenIndex; return XvScreenIndex;
} }
_X_EXPORT unsigned long _X_EXPORT unsigned long
XvGetRTPort() XvGetRTPort(void)
{ {
return XvRTPort; return XvRTPort;
} }

View File

@ -675,7 +675,7 @@ SProcXvMCDispatch (ClientPtr client)
} }
void void
XvMCExtensionInit() XvMCExtensionInit(void)
{ {
ExtensionEntry *extEntry; ExtensionEntry *extEntry;

View File

@ -410,13 +410,13 @@ configReconnect(OsTimerPtr timer, CARD32 time, pointer arg)
} }
void void
configInitialise() configInitialise(void)
{ {
TimerSet(NULL, 0, 1, configReconnect, NULL); TimerSet(NULL, 0, 1, configReconnect, NULL);
} }
void void
configFini() configFini(void)
{ {
DBusError error; DBusError error;

View File

@ -167,7 +167,7 @@ NameForAtom(Atom atom)
} }
void void
AtomError() AtomError(void)
{ {
FatalError("initializing atoms"); FatalError("initializing atoms");
} }
@ -185,7 +185,7 @@ FreeAtom(NodePtr patom)
} }
void void
FreeAllAtoms() FreeAllAtoms(void)
{ {
if(atomRoot == (NodePtr)NULL) if(atomRoot == (NodePtr)NULL)
return; return;
@ -197,7 +197,7 @@ FreeAllAtoms()
} }
void void
InitAtoms() InitAtoms(void)
{ {
FreeAllAtoms(); FreeAllAtoms();
tableLength = InitialTableSize; tableLength = InitialTableSize;

View File

@ -314,7 +314,7 @@ CorePointerProc(DeviceIntPtr pDev, int what)
} }
void void
InitCoreDevices() InitCoreDevices(void)
{ {
DeviceIntPtr dev; DeviceIntPtr dev;
@ -373,7 +373,7 @@ InitCoreDevices()
} }
int int
InitAndStartDevices() InitAndStartDevices(void)
{ {
DeviceIntPtr dev, next; DeviceIntPtr dev, next;
@ -503,7 +503,7 @@ CloseDevice(DeviceIntPtr dev)
} }
void void
CloseDownDevices() CloseDownDevices(void)
{ {
DeviceIntPtr dev, next; DeviceIntPtr dev, next;
@ -580,7 +580,7 @@ RemoveDevice(DeviceIntPtr dev)
} }
int int
NumMotionEvents() NumMotionEvents(void)
{ {
return inputInfo.pointer->valuator->numMotionEvents; return inputInfo.pointer->valuator->numMotionEvents;
} }
@ -598,13 +598,13 @@ RegisterKeyboardDevice(DeviceIntPtr device)
} }
_X_EXPORT DevicePtr _X_EXPORT DevicePtr
LookupKeyboardDevice() LookupKeyboardDevice(void)
{ {
return inputInfo.keyboard ? &inputInfo.keyboard->public : NULL; return inputInfo.keyboard ? &inputInfo.keyboard->public : NULL;
} }
_X_EXPORT DevicePtr _X_EXPORT DevicePtr
LookupPointerDevice() LookupPointerDevice(void)
{ {
return inputInfo.pointer ? &inputInfo.pointer->public : NULL; return inputInfo.pointer ? &inputInfo.pointer->public : NULL;
} }

View File

@ -218,7 +218,7 @@ SetInputCheck(HWEventQueuePtr c0, HWEventQueuePtr c1)
} }
_X_EXPORT void _X_EXPORT void
UpdateCurrentTime() UpdateCurrentTime(void)
{ {
TimeStamp systime; TimeStamp systime;
@ -237,7 +237,7 @@ UpdateCurrentTime()
/* Like UpdateCurrentTime, but can't call ProcessInputEvents */ /* Like UpdateCurrentTime, but can't call ProcessInputEvents */
_X_EXPORT void _X_EXPORT void
UpdateCurrentTimeIf() UpdateCurrentTimeIf(void)
{ {
TimeStamp systime; TimeStamp systime;
@ -250,7 +250,7 @@ UpdateCurrentTimeIf()
} }
void void
InitSelections() InitSelections(void)
{ {
if (CurrentSelections) if (CurrentSelections)
xfree(CurrentSelections); xfree(CurrentSelections);
@ -3654,7 +3654,7 @@ CloseDownClient(ClientPtr client)
} }
static void static void
KillAllClients() KillAllClients(void)
{ {
int i; int i;
for (i=1; i<currentMaxClients; i++) for (i=1; i<currentMaxClients; i++)

View File

@ -1878,7 +1878,7 @@ DeleteClientFontStuff(ClientPtr client)
} }
void void
InitFonts () InitFonts (void)
{ {
patternCache = MakeFontPatternCache(); patternCache = MakeFontPatternCache();
@ -1997,7 +1997,7 @@ RegisterFPEFunctions(NameCheckFunc name_func,
} }
void void
FreeFonts() FreeFonts(void)
{ {
if (patternCache) { if (patternCache) {
FreeFontPatternCache(patternCache); FreeFontPatternCache(patternCache);

View File

@ -550,7 +550,7 @@ RemoveBlockAndWakeupHandlers (BlockHandlerProcPtr blockHandler,
} }
void void
InitBlockAndWakeupHandlers () InitBlockAndWakeupHandlers (void)
{ {
xfree (handlers); xfree (handlers);
handlers = (BlockHandlerPtr) 0; handlers = (BlockHandlerPtr) 0;
@ -950,7 +950,7 @@ DeleteCallbackList(CallbackListPtr *pcbl)
} }
void void
InitCallbackManager() InitCallbackManager(void)
{ {
int i; int i;

View File

@ -844,7 +844,7 @@ ConfineCursorToWindow(WindowPtr pWin, Bool generateEvents, Bool confineToScreen)
} }
_X_EXPORT Bool _X_EXPORT Bool
PointerConfinedToScreen() PointerConfinedToScreen(void)
{ {
return sprite.confined; return sprite.confined;
} }
@ -913,19 +913,19 @@ PostNewCursor(void)
} }
_X_EXPORT WindowPtr _X_EXPORT WindowPtr
GetCurrentRootWindow() GetCurrentRootWindow(void)
{ {
return ROOT; return ROOT;
} }
_X_EXPORT WindowPtr _X_EXPORT WindowPtr
GetSpriteWindow() GetSpriteWindow(void)
{ {
return sprite.win; return sprite.win;
} }
_X_EXPORT CursorPtr _X_EXPORT CursorPtr
GetSpriteCursor() GetSpriteCursor(void)
{ {
return sprite.current; return sprite.current;
} }
@ -939,7 +939,7 @@ GetSpritePosition(int *px, int *py)
#ifdef PANORAMIX #ifdef PANORAMIX
_X_EXPORT int _X_EXPORT int
XineramaGetCursorScreen() XineramaGetCursorScreen(void)
{ {
if(!noPanoramiXExtension) { if(!noPanoramiXExtension) {
return sprite.screen->myNum; return sprite.screen->myNum;
@ -1114,7 +1114,7 @@ FreezeThaw(DeviceIntPtr dev, Bool frozen)
} }
void void
ComputeFreezes() ComputeFreezes(void)
{ {
DeviceIntPtr replayDev = syncEvents.replayDev; DeviceIntPtr replayDev = syncEvents.replayDev;
int i; int i;
@ -2047,7 +2047,7 @@ CheckMotion(xEvent *xE)
} }
_X_EXPORT void _X_EXPORT void
WindowsRestructured() WindowsRestructured(void)
{ {
(void) CheckMotion((xEvent *)NULL); (void) CheckMotion((xEvent *)NULL);
} }
@ -3970,7 +3970,7 @@ ProcQueryPointer(ClientPtr client)
} }
void void
InitEvents() InitEvents(void)
{ {
int i; int i;

View File

@ -278,7 +278,7 @@ MinorOpcodeOfRequest(ClientPtr client)
} }
void void
CloseDownExtensions() CloseDownExtensions(void)
{ {
int i,j; int i,j;

View File

@ -73,7 +73,7 @@ extern Bool XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies);
* Pick some arbitrary size for Xi motion history. * Pick some arbitrary size for Xi motion history.
*/ */
_X_EXPORT int _X_EXPORT int
GetMotionHistorySize() GetMotionHistorySize(void)
{ {
return MOTION_HISTORY_SIZE; return MOTION_HISTORY_SIZE;
} }
@ -183,7 +183,7 @@ updateMotionHistory(DeviceIntPtr pDev, CARD32 ms, int first_valuator,
* xEvent *events = xcalloc(sizeof(xEvent), GetMaximumEventsNum()); * xEvent *events = xcalloc(sizeof(xEvent), GetMaximumEventsNum());
*/ */
_X_EXPORT int _X_EXPORT int
GetMaximumEventsNum() { GetMaximumEventsNum(void) {
/* Two base events -- core and device, plus valuator events. Multiply /* Two base events -- core and device, plus valuator events. Multiply
* by two if we're doing key repeats. */ * by two if we're doing key repeats. */
int ret = 2 + MAX_VALUATOR_EVENTS; int ret = 2 + MAX_VALUATOR_EVENTS;

View File

@ -11,7 +11,7 @@
#include <X11/Xatom.h> #include <X11/Xatom.h>
#include "misc.h" #include "misc.h"
#include "dix.h" #include "dix.h"
void MakePredeclaredAtoms() void MakePredeclaredAtoms(void)
{ {
if (MakeAtom("PRIMARY", 7, 1) != XA_PRIMARY) AtomError(); if (MakeAtom("PRIMARY", 7, 1) != XA_PRIMARY) AtomError();
if (MakeAtom("SECONDARY", 9, 1) != XA_SECONDARY) AtomError(); if (MakeAtom("SECONDARY", 9, 1) != XA_SECONDARY) AtomError();

View File

@ -544,7 +544,7 @@ static int padlength[4] = {0, 3, 2, 1};
static static
#endif #endif
Bool Bool
CreateConnectionBlock() CreateConnectionBlock(void)
{ {
xConnSetup setup; xConnSetup setup;
xWindowRoot root; xWindowRoot root;

View File

@ -60,7 +60,7 @@ unsigned *extensionPrivateSizes;
unsigned totalExtensionSize; unsigned totalExtensionSize;
void void
ResetExtensionPrivates() ResetExtensionPrivates(void)
{ {
extensionPrivateCount = 0; extensionPrivateCount = 0;
extensionPrivateLen = 0; extensionPrivateLen = 0;
@ -71,7 +71,7 @@ ResetExtensionPrivates()
} }
_X_EXPORT int _X_EXPORT int
AllocateExtensionPrivateIndex() AllocateExtensionPrivateIndex(void)
{ {
return extensionPrivateCount++; return extensionPrivateCount++;
} }
@ -117,7 +117,7 @@ unsigned *clientPrivateSizes;
unsigned totalClientSize; unsigned totalClientSize;
void void
ResetClientPrivates() ResetClientPrivates(void)
{ {
clientPrivateCount = 0; clientPrivateCount = 0;
clientPrivateLen = 0; clientPrivateLen = 0;
@ -128,7 +128,7 @@ ResetClientPrivates()
} }
_X_EXPORT int _X_EXPORT int
AllocateClientPrivateIndex() AllocateClientPrivateIndex(void)
{ {
return clientPrivateCount++; return clientPrivateCount++;
} }
@ -171,7 +171,7 @@ AllocateClientPrivate(int index2, unsigned amount)
int screenPrivateCount; int screenPrivateCount;
void void
ResetScreenPrivates() ResetScreenPrivates(void)
{ {
screenPrivateCount = 0; screenPrivateCount = 0;
} }
@ -180,7 +180,7 @@ ResetScreenPrivates()
* so we have to worry about resizing existing devPrivates * so we have to worry about resizing existing devPrivates
*/ */
_X_EXPORT int _X_EXPORT int
AllocateScreenPrivateIndex() AllocateScreenPrivateIndex(void)
{ {
int idx; int idx;
int i; int i;
@ -213,13 +213,13 @@ AllocateScreenPrivateIndex()
static int windowPrivateCount; static int windowPrivateCount;
void void
ResetWindowPrivates() ResetWindowPrivates(void)
{ {
windowPrivateCount = 0; windowPrivateCount = 0;
} }
_X_EXPORT int _X_EXPORT int
AllocateWindowPrivateIndex() AllocateWindowPrivateIndex(void)
{ {
return windowPrivateCount++; return windowPrivateCount++;
} }
@ -263,13 +263,13 @@ AllocateWindowPrivate(ScreenPtr pScreen, int index2, unsigned amount)
static int gcPrivateCount; static int gcPrivateCount;
void void
ResetGCPrivates() ResetGCPrivates(void)
{ {
gcPrivateCount = 0; gcPrivateCount = 0;
} }
_X_EXPORT int _X_EXPORT int
AllocateGCPrivateIndex() AllocateGCPrivateIndex(void)
{ {
return gcPrivateCount++; return gcPrivateCount++;
} }
@ -312,13 +312,13 @@ AllocateGCPrivate(ScreenPtr pScreen, int index2, unsigned amount)
static int pixmapPrivateCount; static int pixmapPrivateCount;
void void
ResetPixmapPrivates() ResetPixmapPrivates(void)
{ {
pixmapPrivateCount = 0; pixmapPrivateCount = 0;
} }
_X_EXPORT int _X_EXPORT int
AllocatePixmapPrivateIndex() AllocatePixmapPrivateIndex(void)
{ {
return pixmapPrivateCount++; return pixmapPrivateCount++;
} }
@ -363,7 +363,7 @@ AllocatePixmapPrivate(ScreenPtr pScreen, int index2, unsigned amount)
int colormapPrivateCount; int colormapPrivateCount;
void void
ResetColormapPrivates() ResetColormapPrivates(void)
{ {
colormapPrivateCount = 0; colormapPrivateCount = 0;
} }
@ -424,7 +424,7 @@ AllocateColormapPrivateIndex (InitCmapPrivFunc initPrivFunc)
static int devicePrivateIndex = 0; static int devicePrivateIndex = 0;
_X_EXPORT int _X_EXPORT int
AllocateDevicePrivateIndex() AllocateDevicePrivateIndex(void)
{ {
return devicePrivateIndex++; return devicePrivateIndex++;
} }

View File

@ -235,7 +235,7 @@ CreateNewResourceType(DeleteType deleteFunc)
} }
_X_EXPORT RESTYPE _X_EXPORT RESTYPE
CreateNewResourceClass() CreateNewResourceClass(void)
{ {
RESTYPE next = lastResourceClass >> 1; RESTYPE next = lastResourceClass >> 1;
@ -844,7 +844,7 @@ FreeClientResources(ClientPtr client)
} }
void void
FreeAllResources() FreeAllResources(void)
{ {
int i; int i;

View File

@ -176,7 +176,7 @@ xnestOpenDisplay(int argc, char *argv[])
} }
void void
xnestCloseDisplay() xnestCloseDisplay(void)
{ {
if (!xnestDoFullGeneration || !xnestDisplay) return; if (!xnestDoFullGeneration || !xnestDisplay) return;

View File

@ -52,7 +52,7 @@ ProcessInputEvents()
} }
int int
TimeSinceLastInputEvent() TimeSinceLastInputEvent(void)
{ {
if (lastEventTime == 0) if (lastEventTime == 0)
lastEventTime = GetTimeInMillis(); lastEventTime = GetTimeInMillis();
@ -60,7 +60,7 @@ TimeSinceLastInputEvent()
} }
void void
SetTimeSinceLastInputEvent() SetTimeSinceLastInputEvent(void)
{ {
lastEventTime = GetTimeInMillis(); lastEventTime = GetTimeInMillis();
} }
@ -78,7 +78,7 @@ xnestNotExposurePredicate(Display *display, XEvent *event, char *args)
} }
void void
xnestCollectExposures() xnestCollectExposures(void)
{ {
XEvent X; XEvent X;
WindowPtr pWin; WindowPtr pWin;
@ -113,7 +113,7 @@ xnestQueueKeyEvent(int type, unsigned int keycode)
} }
void void
xnestCollectEvents() xnestCollectEvents(void)
{ {
XEvent X; XEvent X;
xEvent x; xEvent x;

View File

@ -385,7 +385,7 @@ static int miVisualPriority[] = {
static miVisualsPtr miVisuals; static miVisualsPtr miVisuals;
_X_EXPORT void _X_EXPORT void
miClearVisualTypes() miClearVisualTypes(void)
{ {
miVisualsPtr v; miVisualsPtr v;
@ -690,7 +690,7 @@ miDoInitVisuals(VisualPtr *visualp, DepthPtr *depthp, int *nvisualp,
} }
void void
miResetInitVisuals() miResetInitVisuals(void)
{ {
miInitVisualsProc = miDoInitVisuals; miInitVisualsProc = miDoInitVisuals;
} }

View File

@ -80,7 +80,7 @@ typedef struct _EventQueue {
static EventQueueRec miEventQueue; static EventQueueRec miEventQueue;
Bool Bool
mieqInit() mieqInit(void)
{ {
int i; int i;
@ -195,7 +195,7 @@ mieqSetHandler(int event, mieqHandler handler)
/* Call this from ProcessInputEvents(). */ /* Call this from ProcessInputEvents(). */
void void
mieqProcessInputEvents() mieqProcessInputEvents(void)
{ {
EventRec *e = NULL; EventRec *e = NULL;
int x = 0, y = 0; int x = 0, y = 0;

View File

@ -221,7 +221,7 @@ LogInit(const char *fname, const char *backup)
} }
void void
LogClose() LogClose(void)
{ {
if (logFile) { if (logFile) {
fclose(logFile); fclose(logFile);
@ -616,7 +616,7 @@ Error(char *str)
} }
void void
LogPrintMarkers() LogPrintMarkers(void)
{ {
/* Show what the message marker symbols mean. */ /* Show what the message marker symbols mean. */
ErrorF("Markers: "); ErrorF("Markers: ");

View File

@ -102,7 +102,7 @@ typedef struct _builtinColor {
#define NUM_BUILTIN_COLORS (sizeof (BuiltinColors) / sizeof (BuiltinColors[0])) #define NUM_BUILTIN_COLORS (sizeof (BuiltinColors) / sizeof (BuiltinColors[0]))
Bool Bool
OsInitColors() OsInitColors(void)
{ {
return TRUE; return TRUE;
} }

View File

@ -86,13 +86,13 @@ static int globalTotalGlyphPrivateSize = 0;
static int glyphPrivateCount = 0; static int glyphPrivateCount = 0;
void void
ResetGlyphPrivates () ResetGlyphPrivates (void)
{ {
glyphPrivateCount = 0; glyphPrivateCount = 0;
} }
int int
AllocateGlyphPrivateIndex () AllocateGlyphPrivateIndex (void)
{ {
return glyphPrivateCount++; return glyphPrivateCount++;
} }