X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fx11%2Ffg_input_devices_x11.c;h=e5bd55a14e4cc91dcbfa1f04a59abc4a370dbd86;hb=0c5339dad42bcdda8cc4c86b16194f7267578cd2;hp=a94e52a268cf544be76015d4ae26ebce2e529c88;hpb=5b3d339481bac6dbaeb599bffc1325f716585bfe;p=freeglut diff --git a/src/x11/fg_input_devices_x11.c b/src/x11/fg_input_devices_x11.c index a94e52a..e5bd55a 100644 --- a/src/x11/fg_input_devices_x11.c +++ b/src/x11/fg_input_devices_x11.c @@ -1,5 +1,5 @@ /* - * freeglut_input_devices_x11.c + * fg_input_devices_x11.c * * Handles miscellaneous input devices via direct serial-port access. * Proper X11 XInput device support is not yet supported. @@ -30,16 +30,10 @@ * DEALINGS IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - #include #include "../fg_internal.h" -#ifdef HAVE_ERRNO_H #include -#endif #include #include #include @@ -54,10 +48,7 @@ struct _serialport { typedef struct _serialport SERIALPORT; -void serial_flush ( SERIALPORT *port ); - -/* local variables */ -static SERIALPORT *dialbox_port=NULL; +void fg_serial_flush ( SERIALPORT *port ); /*****************************************************************/ @@ -68,7 +59,7 @@ void fgPlatformRegisterDialDevice ( const char *dial_device ) { } -SERIALPORT *serial_open ( const char *device ) +SERIALPORT *fg_serial_open ( const char *device ) { int fd; struct termios termio; @@ -97,11 +88,11 @@ SERIALPORT *serial_open ( const char *device ) cfsetospeed(&termio, B9600); tcsetattr(fd,TCSANOW,&termio); - serial_flush(port); + fg_serial_flush(port); return port; } -void serial_close(SERIALPORT *port) +void fg_serial_close(SERIALPORT *port) { if (port) { @@ -112,7 +103,7 @@ void serial_close(SERIALPORT *port) } } -int serial_getchar(SERIALPORT *port) +int fg_serial_getchar(SERIALPORT *port) { unsigned char ch; if (!port) return EOF; @@ -120,13 +111,13 @@ int serial_getchar(SERIALPORT *port) return EOF; } -int serial_putchar(SERIALPORT *port, unsigned char ch) +int fg_serial_putchar(SERIALPORT *port, unsigned char ch) { if (!port) return 0; return write(port->fd,&ch,1); } -void serial_flush ( SERIALPORT *port ) +void fg_serial_flush ( SERIALPORT *port ) { tcflush ( port->fd, TCIOFLUSH ); }