I want to open 2 serial ports, one port to input data from a GPS device, another port to output the modified data to another computer.

But i got only one ibmcom3.c file(for on/off and setting up serial port), and this is C code, I cannot make c++ objects, i thought about writing another file say ibmcom3b.c by adding a prefix _b to all the functions and variables of ibmcom3.c, but that's a lot of work.

Is there a simpler way to do this?


The main code:
http://www.boondog.com/tutorials/gps/gps1_5.c

the ibmcom3.c file for serial link communication
http://www.boondog.com/tutorials/gps/ibmcom3.zip

Thanks in advance!