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=d77e970a225b6f591c638d4d1ee8db2a64fdb87e;hpb=5f776d0acf334829af8ab0855d6f67794dd898c9;p=freeglut diff --git a/src/x11/fg_input_devices_x11.c b/src/x11/fg_input_devices_x11.c index d77e970..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. @@ -33,9 +33,7 @@ #include #include "../fg_internal.h" -#ifdef HAVE_ERRNO_H #include -#endif #include #include #include @@ -50,7 +48,7 @@ struct _serialport { typedef struct _serialport SERIALPORT; -void serial_flush ( SERIALPORT *port ); +void fg_serial_flush ( SERIALPORT *port ); /*****************************************************************/ @@ -61,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; @@ -90,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) { @@ -105,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; @@ -113,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 ); }