Macintosh/FTDI-Friend/XBee, need assistance on Macintosh side

I am new to the Digi support forums and am not quite sure where to post. And my system crosses several interfaces, which makes it more confusing. Apologies if I am posting to the wrong forum.

I am trying to drive an XBee Series 1 (not the pro) that is mounted on an AdaFruit XBee adapter board, which is in turn connected to a USB port of my Macintosh via an FTDI Friend USB/TTL-232 cable.

The good news is that all the hardware and drivers seem to work; I can talk from a serial monitor on the Mac, through to the XBee and thence to a remote XBee system (backed by a Parallax propellor), and receive reply communications back to the serial monitor.

The problem is that I don’t want to use a serial monitor on the Mac, I want to be able to talk through the USB port to the XBee from a C++ program, and I do not know how to do that. I am sure it can be done – the serial ports all do it – but I can’t find any open-source code for them.

I would say that I am a very experienced C++ coder in general, but haven’t used hardware ports under Unix at all, ever. I am hoping there is some way to open the port MacOS creates for me – something of the form /dev/tty.usbserial-ABCD1234 – and use the likes of fgetc and fputc to do what I want, perhaps using ioctl to configure the port, but I am not sure how to do that and could use pointers to some tutorials or sample code, if it is indeed possible to o it that way, or some other form of guidance if it is not.

Thanks much …