TIP: Click on subject to list as thread! ANSI
echo: cis.telecommunications
to: all
from: Bob van der Poel 76510,2203
date: 1991-03-26 20:57:14
subject: #remote software blues

#: 9992 S7/Telecommunications
    26-Mar-91  20:57:14
Sb: #remote software blues
Fm: Bob van der Poel 76510,2203
To: all


I'm trying to write a no-frill terminal driver to be used in testing some
programs being written on the MM/1 on a coco acting as a terminal. As a start I
coded the following very "simple" program...

   #include 
   #include 
   main()
   {
      char databuff[300];
      int termpath, t;
      if(termpath=open("/t2",S_IREAD+S_IWRITE))<1) exit(errno));
      for(;;){
         if((t=_gs_rdy(0))>0){
            read(0,databuff,t);
            write(termpath,databuff,t);
         }
         if((t=_gs_rdy(termpath)>>0){
            read(termpath,databuff,t);
            write(1,databuff,t);
         }
      }
   }

Problem is, it just doesn't work. It terminates after a few characters are
sent/received. If I use sterm or xcom9 with the same setup all works fine. So I
assume that I have to some error checking when reading??? Any one already been
though this?

There is 1 Reply.

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.