kopia lustrzana https://github.com/Hamlib/Hamlib
'path' field renamed in port_t
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@608 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.1.2
rodzic
e115bf459b
commit
bdfe0b969a
14
src/rig.c
14
src/rig.c
|
@ -12,7 +12,7 @@
|
|||
* Hamlib Interface - main file
|
||||
* Copyright (c) 2000,2001 by Stephane Fillod and Frank Singleton
|
||||
*
|
||||
* $Id: rig.c,v 1.42 2001-07-21 13:00:03 f4cfe Exp $
|
||||
* $Id: rig.c,v 1.43 2001-07-25 21:59:55 f4cfe Exp $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
|
@ -280,7 +280,7 @@ RIG *rig_init(rig_model_t rig_model)
|
|||
rs = &rig->state;
|
||||
|
||||
rs->rigport.type.rig = caps->port_type; /* default from caps */
|
||||
strncpy(rs->rigport.path, DEFAULT_SERIAL_PORT, FILPATHLEN);
|
||||
strncpy(rs->rigport.pathname, DEFAULT_SERIAL_PORT, FILPATHLEN);
|
||||
rs->rigport.parm.serial.rate = caps->serial_rate_max; /* fastest ! */
|
||||
rs->rigport.parm.serial.data_bits = caps->serial_data_bits;
|
||||
rs->rigport.parm.serial.stop_bits = caps->serial_stop_bits;
|
||||
|
@ -398,7 +398,7 @@ int rig_open(RIG *rig)
|
|||
break;
|
||||
|
||||
case RIG_PORT_DEVICE:
|
||||
status = open(rig->state.rigport.path, O_RDWR, 0);
|
||||
status = open(rig->state.rigport.pathname, O_RDWR, 0);
|
||||
if (status < 0)
|
||||
return -RIG_EIO;
|
||||
rig->state.rigport.fd = status;
|
||||
|
@ -426,13 +426,13 @@ int rig_open(RIG *rig)
|
|||
rig->state.pttport.fd = ser_open(&rig->state.pttport);
|
||||
if (rig->state.pttport.fd < 0)
|
||||
rig_debug(RIG_DEBUG_ERR, "Cannot open PTT device \"%s\"\n",
|
||||
rig->state.pttport.path);
|
||||
rig->state.pttport.pathname);
|
||||
break;
|
||||
case RIG_PTT_PARALLEL:
|
||||
rig->state.pttport.fd = par_open(&rig->state.pttport);
|
||||
if (rig->state.pttport.fd < 0)
|
||||
rig_debug(RIG_DEBUG_ERR, "Cannot open PTT device \"%s\"\n",
|
||||
rig->state.pttport.path);
|
||||
rig->state.pttport.pathname);
|
||||
break;
|
||||
default:
|
||||
rig_debug(RIG_DEBUG_ERR, "Unsupported PTT type %d\n",
|
||||
|
@ -448,13 +448,13 @@ int rig_open(RIG *rig)
|
|||
rig->state.dcdport.fd = ser_open(&rig->state.dcdport);
|
||||
if (rig->state.dcdport.fd < 0)
|
||||
rig_debug(RIG_DEBUG_ERR, "Cannot open DCD device \"%s\"\n",
|
||||
rig->state.dcdport.path);
|
||||
rig->state.dcdport.pathname);
|
||||
break;
|
||||
case RIG_DCD_PARALLEL:
|
||||
rig->state.dcdport.fd = par_open(&rig->state.dcdport);
|
||||
if (rig->state.dcdport.fd < 0)
|
||||
rig_debug(RIG_DEBUG_ERR, "Cannot open DCD device \"%s\"\n",
|
||||
rig->state.dcdport.path);
|
||||
rig->state.dcdport.pathname);
|
||||
break;
|
||||
default:
|
||||
rig_debug(RIG_DEBUG_ERR, "Unsupported DCD type %d\n",
|
||||
|
|
12
src/serial.c
12
src/serial.c
|
@ -4,7 +4,7 @@
|
|||
* Parts of the PTT handling are derived from soundmodem, an excellent
|
||||
* ham packet softmodem written by Thomas Sailer, HB9JNX.
|
||||
*
|
||||
* $Id: serial.c,v 1.16 2001-07-13 19:08:15 f4cfe Exp $
|
||||
* $Id: serial.c,v 1.17 2001-07-25 21:59:55 f4cfe Exp $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
|
@ -101,14 +101,14 @@ int serial_open(port_t *rp) {
|
|||
/*
|
||||
* Open in Non-blocking mode. Watch for EAGAIN errors!
|
||||
*/
|
||||
fd = open(rp->path, O_RDWR | O_NOCTTY | O_NDELAY);
|
||||
fd = open(rp->pathname, O_RDWR | O_NOCTTY | O_NDELAY);
|
||||
|
||||
if (fd == -1) {
|
||||
|
||||
/* Could not open the port. */
|
||||
|
||||
rig_debug(RIG_DEBUG_ERR, "serial_open: Unable to open %s - %s\n",
|
||||
rp->path, strerror(errno));
|
||||
rp->pathname, strerror(errno));
|
||||
return -RIG_EIO;
|
||||
}
|
||||
|
||||
|
@ -612,7 +612,7 @@ int fread_block(port_t *p, char *rxbuffer, size_t count)
|
|||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
int ser_open(port_t *p)
|
||||
{
|
||||
const char *path = p->path;
|
||||
const char *path = p->pathname;
|
||||
HANDLE h;
|
||||
DCB dcb;
|
||||
|
||||
|
@ -634,7 +634,7 @@ int ser_open(port_t *p)
|
|||
#else
|
||||
int ser_open(port_t *p)
|
||||
{
|
||||
return (p->fd = open(p->path, O_RDWR | O_NOCTTY));
|
||||
return (p->fd = open(p->pathname, O_RDWR | O_NOCTTY));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -774,7 +774,7 @@ int par_open(port_t *p)
|
|||
{
|
||||
int fd;
|
||||
|
||||
fd = open(p->path, O_RDWR);
|
||||
fd = open(p->pathname, O_RDWR);
|
||||
#ifdef HAVE_LINUX_PPDEV_H
|
||||
ioctl(fd, PPCLAIM);
|
||||
#endif
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* This programs dumps the mmeory contents of a rig.
|
||||
*
|
||||
*
|
||||
* $Id: dumpmem.c,v 1.4 2001-07-01 11:46:17 f4cfe Exp $
|
||||
* $Id: dumpmem.c,v 1.5 2001-07-25 21:59:55 f4cfe Exp $
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -69,7 +69,7 @@ int main (int argc, char *argv[])
|
|||
exit(1); /* whoops! something went wrong (mem alloc?) */
|
||||
}
|
||||
|
||||
strncpy(my_rig->state.rigport.path, SERIAL_PORT, FILPATHLEN);
|
||||
strncpy(my_rig->state.rigport.pathname, SERIAL_PORT, FILPATHLEN);
|
||||
|
||||
if (rig_open(my_rig))
|
||||
exit(2);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* It takes commands in interactive mode as well as
|
||||
* from command line options.
|
||||
*
|
||||
* $Id: rigctl.c,v 1.19 2001-07-20 11:09:26 f4cfe Exp $
|
||||
* $Id: rigctl.c,v 1.20 2001-07-25 21:59:55 f4cfe Exp $
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -309,7 +309,7 @@ int main (int argc, char *argv[])
|
|||
}
|
||||
|
||||
if (rig_file)
|
||||
strncpy(my_rig->state.rigport.path, rig_file, FILPATHLEN);
|
||||
strncpy(my_rig->state.rigport.pathname, rig_file, FILPATHLEN);
|
||||
|
||||
/*
|
||||
* ex: RIG_PTT_PARALLEL and /dev/parport0
|
||||
|
@ -319,9 +319,9 @@ int main (int argc, char *argv[])
|
|||
if (dcd_type != RIG_DCD_NONE)
|
||||
my_rig->state.dcdport.type.dcd = dcd_type;
|
||||
if (ptt_file)
|
||||
strncpy(my_rig->state.pttport.path, ptt_file, FILPATHLEN);
|
||||
strncpy(my_rig->state.pttport.pathname, ptt_file, FILPATHLEN);
|
||||
if (dcd_file)
|
||||
strncpy(my_rig->state.dcdport.path, dcd_file, FILPATHLEN);
|
||||
strncpy(my_rig->state.dcdport.pathname, dcd_file, FILPATHLEN);
|
||||
|
||||
if ((retcode = rig_open(my_rig)) != RIG_OK) {
|
||||
fprintf(stderr,"rig_open: error = %s \n", rigerror(retcode));
|
||||
|
|
|
@ -37,7 +37,7 @@ int main (int argc, char *argv[])
|
|||
myport.parm.serial.stop_bits = 1;
|
||||
myport.parm.serial.parity = RIG_PARITY_NONE;
|
||||
myport.parm.serial.handshake = RIG_HANDSHAKE_NONE;
|
||||
strncpy(myport.path, SERIAL_PORT, FILPATHLEN);
|
||||
strncpy(myport.pathname, SERIAL_PORT, FILPATHLEN);
|
||||
|
||||
rig_load_all_backends();
|
||||
myrig_model = rig_probe(&myport);
|
||||
|
@ -53,7 +53,7 @@ int main (int argc, char *argv[])
|
|||
exit(1); /* whoops! something went wrong (mem alloc?) */
|
||||
}
|
||||
|
||||
strncpy(my_rig->state.rigport.path,SERIAL_PORT,FILPATHLEN);
|
||||
strncpy(my_rig->state.rigport.pathname,SERIAL_PORT,FILPATHLEN);
|
||||
|
||||
retcode = rig_open(my_rig);
|
||||
if (retcode != RIG_OK) {
|
||||
|
|
|
@ -49,7 +49,7 @@ int main (int argc, char *argv[])
|
|||
exit(1); /* whoops! something went wrong (mem alloc?) */
|
||||
}
|
||||
|
||||
strncpy(my_rig->state.rigport.path, SERIAL_PORT, FILPATHLEN);
|
||||
strncpy(my_rig->state.rigport.pathname, SERIAL_PORT, FILPATHLEN);
|
||||
|
||||
if (rig_open(my_rig))
|
||||
exit(2);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2001 pab@users.sourceforge.net
|
||||
* Derived from hamlib code (C) 2000,2001 Stephane Fillod.
|
||||
*
|
||||
* $Id: winradio.c,v 1.13 2001-07-13 19:08:15 f4cfe Exp $
|
||||
* $Id: winradio.c,v 1.14 2001-07-25 21:59:55 f4cfe Exp $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
|
@ -57,7 +57,7 @@
|
|||
|
||||
int wr_rig_init(RIG *rig) {
|
||||
rig->state.rigport.type.rig = RIG_PORT_DEVICE;
|
||||
strncpy(rig->state.rigport.path, DEFAULT_WINRADIO_PATH, FILPATHLEN);
|
||||
strncpy(rig->state.rigport.pathname, DEFAULT_WINRADIO_PATH, FILPATHLEN);
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue