Mail Archives: djgpp/2001/12/04/13:00:17
> Date: Tue, 4 Dec 2001 06:41:18 -0800 (PST)
> From: ROLAND <roland_asmann AT yahoo DOT com>
>
> Well I've been going over the program again, and what
> it does (basically) is this (don't mind the parameters
> and stuff, 'cause I left some of them out):
>
> f3=open(/dev/tty00) /*for reading*/
>
> f4=open(/dev/tty00) /*for writing*/
>
> while(somethingToSend)
> /*A call to a checkroutine, but I forgot the name*/
> write(f3,message);
>
> /* The checkroutine */
> while(someStatus)
> read(f3,reply)
>
> I have to get this working on a PC.
> I have been told (in this mailinglist) that I should
> use a special package for serial communication for PC.
> Can anybody help me with this?
You need to use the DJGPP Filesystem Extensions feature to catch
library calls as above and redirect them to the async communications
library you downloaded.
For working examples of using Filesystem Extensions for similar
purposes, look in ports of GNU software, such as GNU Fileutils (file
ls-msdos.c) and Ispell (file djterm.c).
> One more thing, the original program was using
> <sgtty.h> which I have replaced with <termios.h> and
> <sys/ioctl.h>. If there is something wrong with this,
> than please advise about it to!
You will have to resolve this one step at a time. If you have
specific problems to compile with these header files, try to figure
out how to get the same functionality with DJGPP, and if you can't
figure that out, post the details here.
- Raw text -