[Xastir-Dev] Change igate.c

Randall Bohn rsbohn at myrealbox.com
Wed Apr 23 11:05:39 EDT 2003


List ate my attachment. :(

I tried to post a patch that would collect all

switch (data_port[port].device_type) {...}

in igate.c with a function call, is_TNC(port). Then when new TNC types are added to the system you would just change the function, rather than four switch statements scattered throughout igate.c. Perhaps this would be useful in the system in general, rather than just for igate.c.

int is_TNC(int port) {
 switch (data_port[port].device_type) {
  case DEVICE_SERIAL_TNC_AUX_GPS:
  case DEVICE_SERIAL_TNC_HSP_GPS:
  case DEVICE_SERIAL_TNC:
  case DEVICE_AX25_TNC:
  case DEVICE_SERIAL_KISS_TNC:
  case DEVICE_NET_AGWPE:
   return 1;
  default:
   return 0;
 }
}


-----Original Message-----
From: "Curt Mills, WE7U" <archer at eskimo.com>
To: Randall Bohn <rsbohn at myrealbox.com>
Date: Tue, 22 Apr 2003 22:39:17 -0700 (PDT)
Subject: Re: [Xastir-Dev] Change igate.c
...

Supporting a new TNC involves much more than just tweaking igate.c.
It usually requires tweaks to interface.c, interface_gui.c, and db.c
if it's a totally new type of interface.




More information about the Xastir-dev mailing list