projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed namespace pollution due to a number of global symbols missing an fg prefix
[freeglut]
/
src
/
x11
/
fg_input_devices_x11.c
diff --git
a/src/x11/fg_input_devices_x11.c
b/src/x11/fg_input_devices_x11.c
index
a94e52a
..
e5bd55a
100644
(file)
--- 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.
*
* 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.
*/
* DEALINGS IN THE SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
#include <GL/freeglut.h>
#include "../fg_internal.h"
#include <GL/freeglut.h>
#include "../fg_internal.h"
-#ifdef HAVE_ERRNO_H
#include <errno.h>
#include <errno.h>
-#endif
#include <sys/ioctl.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <stdio.h>
#include <stdlib.h>
@@
-54,10
+48,7
@@
struct _serialport {
typedef struct _serialport 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;
{
int fd;
struct termios termio;
@@
-97,11
+88,11
@@
SERIALPORT *serial_open ( const char *device )
cfsetospeed(&termio, B9600);
tcsetattr(fd,TCSANOW,&termio);
cfsetospeed(&termio, B9600);
tcsetattr(fd,TCSANOW,&termio);
- serial_flush(port);
+ fg_serial_flush(port);
return port;
}
return port;
}
-void serial_close(SERIALPORT *port)
+void fg_serial_close(SERIALPORT *port)
{
if (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;
{
unsigned char ch;
if (!port) return EOF;
@@
-120,13
+111,13
@@
int serial_getchar(SERIALPORT *port)
return EOF;
}
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);
}
{
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 );
}
{
tcflush ( port->fd, TCIOFLUSH );
}