diff --git a/graphics/grNull.c b/graphics/grNull.c index b6bcec46..7a30db4c 100644 --- a/graphics/grNull.c +++ b/graphics/grNull.c @@ -175,10 +175,11 @@ NullTextSize(text, size, r) * ---------------------------------------------------------------------------- */ +/** @typedef cb_textio_input_t */ void -nullStdin(fd, cdata) - int fd; - ClientData cdata; +nullStdin( + int fd, + ClientData cdata) /* notused */ { int ch; TxInputEvent *event; diff --git a/graphics/grOGL1.c b/graphics/grOGL1.c index 4b3b5acd..2ba1b1b0 100644 --- a/graphics/grOGL1.c +++ b/graphics/grOGL1.c @@ -64,7 +64,7 @@ extern void GrOGLClose(), GrOGLFlush(); extern void GrOGLDelete(), GrOGLConfigure(), GrOGLRaise(), GrOGLLower(); extern void GrOGLLock(), GrOGLUnlock(), GrOGLIconUpdate(); extern bool GrOGLInit(), GrOGLCreate(); -extern void grOGLWStdin(); +extern void grOGLWStdin(int fd, ClientData cdata); /* cb_textio_input_t (unused) */ /*--------------------------------------------------------- @@ -418,8 +418,11 @@ oglSetProjection(llx, lly, width, height) /* is a macro and can be re-implemented using XNextEvent() calls. */ /*----------------------------------------------------------------------*/ +/** @typedef cb_textio_input_t */ void -pipehandler() +pipehandler( + int fd, + ClientData cdata) /* notused */ { TxInputEvent *event; XEvent xevent; @@ -757,12 +760,12 @@ oglSetDisplay (dispType, outFileName, mouseFileName) * * ---------------------------------------------------------------------------- */ - /*ARGSUSED*/ - +/*ARGSUSED*/ +/** @typedef cb_textio_input_t */ void -grOGLWStdin(fd, cdata) - int fd; - ClientData cdata; +grOGLWStdin( + int fd, + ClientData cdata) /* notused */ { int ch; TxInputEvent *event; diff --git a/graphics/grX11su1.c b/graphics/grX11su1.c index 897552f4..5c883489 100644 --- a/graphics/grX11su1.c +++ b/graphics/grX11su1.c @@ -118,7 +118,7 @@ extern void GrX11Close(), GrX11Flush(); extern bool GrX11Init(), GrX11Create(); extern void GrX11Delete(), GrX11Configure(), GrX11Raise(), GrX11Lower(); extern void GrX11Lock(), GrX11Unlock(), GrX11IconUpdate(); -extern void grXWStdin(); +extern void grXWStdin(int fd, ClientData cdata); /* cb_textio_input_t (unused) */ extern bool grx11GetCursorPos(); @@ -739,7 +739,7 @@ GrX11Flush () /* * --------------------------------------------------------------------------- * - * grXStdin -- + * grX11Stdin -- * * Handle the stdin device for the X driver. * @@ -752,8 +752,12 @@ GrX11Flush () * --------------------------------------------------------------------------- */ +/*ARGSUSED*/ +/** @typedef cb_textio_input_t */ void -grX11Stdin() +grX11Stdin( + int fd, + ClientData cdata) /* notused */ { TxInputEvent *event; XEvent xevent; @@ -1104,10 +1108,11 @@ x11SetDisplay (dispType, outFileName, mouseFileName) * ---------------------------------------------------------------------------- */ +/** @typedef cb_textio_input_t */ void -grXWStdin(fd, cdata) - int fd; - ClientData cdata; +grXWStdin( + int fd, + ClientData cdata) /* notused */ { int ch; TxInputEvent *event; diff --git a/textio/textioInt.h b/textio/textioInt.h index a012b49e..569fe6d6 100644 --- a/textio/textioInt.h +++ b/textio/textioInt.h @@ -32,7 +32,8 @@ typedef struct { fd_set tx_fdmask; /* A mask of the file descriptors for this * device. */ - void (*tx_inputProc)(); /* A procedure that fetches events and stores + cb_textio_input_t tx_inputProc; + /* A procedure that fetches events and stores * them in the input queue via TxAddEvent(). */ ClientData tx_cdata; /* Data to be passed back to caller. */ diff --git a/textio/txCommands.c b/textio/txCommands.c index 2c175342..743dc7fe 100644 --- a/textio/txCommands.c +++ b/textio/txCommands.c @@ -457,7 +457,8 @@ TxAddInputDevice( const fd_set *fdmask, /* A mask of file descriptors that this * device will handle. */ - void (*inputProc)(), /* A routine to call. This routine will + const cb_textio_input_t inputProc, + /* A routine to call. This routine will * be passed a single file descriptor that * is ready, and should read that file and * add events(s) by calling TxNewEvent() @@ -484,7 +485,7 @@ TxAddInputDevice( void TxAdd1InputDevice( int fd, - void (*inputProc)(), + const cb_textio_input_t inputProc, ClientData cdata) { fd_set fs; @@ -975,7 +976,7 @@ TxGetInputEvent( FD_ISSET(fd, &(txInputDevice[i].tx_fdmask))) { lastNum = txNumInputEvents; (*(txInputDevice[i].tx_inputProc)) - (fd, txInputDevice[i].tx_cdata); + (fd, txInputDevice[i].tx_cdata); /** @invoke cb_textio_input_t */ FD_CLR(fd, &inputs); /* Did this driver choose to add an event? */ if (txNumInputEvents != lastNum) gotSome = TRUE; diff --git a/textio/txcommands.h b/textio/txcommands.h index 7b9bcc29..a36cedc4 100644 --- a/textio/txcommands.h +++ b/textio/txcommands.h @@ -116,9 +116,9 @@ extern TxCommand TxCurCommand; #define TX_KEY_DOWN 2 /* procedures to help in making device command routines */ - -extern void TxAddInputDevice(const fd_set *fdmask, void (*inputProc)(), ClientData cdata); /* Can read multiple file desc. */ -extern void TxAdd1InputDevice(int fd, void (*inputProc)(), ClientData cdata); /* Can read only 1 file desc. */ +typedef void (*cb_textio_input_t)(int fd, ClientData cdata); +extern void TxAddInputDevice(const fd_set *fdmask, const cb_textio_input_t inputProc, ClientData cdata); /* Can read multiple file desc. */ +extern void TxAdd1InputDevice(int fd, const cb_textio_input_t inputProc, ClientData cdata); /* Can read only 1 file desc. */ extern void TxDeleteInputDevice(const fd_set *fdmask); extern void TxDelete1InputDevice(int fd);