From e968f8e7be755bbfba0b7ebd1a8cd42b5f4b9403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Fillod=2C=20F8CFE?= Date: Tue, 5 Jun 2001 18:08:30 +0000 Subject: [PATCH] misc update for port_t support git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@533 7ae35d74-ebe9-4afe-98af-79ac388436b8 --- src/rig.c | 4 ++-- src/serial.c | 9 +++------ src/serial.h | 4 ++-- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/rig.c b/src/rig.c index ec55aa9c2..ea6a7ca99 100644 --- a/src/rig.c +++ b/src/rig.c @@ -2,7 +2,7 @@ Copyright (C) 2000,2001 Stephane Fillod and Frank Singleton This file is part of the hamlib package. - $Id: rig.c,v 1.32 2001-06-04 21:17:52 f4cfe Exp $ + $Id: rig.c,v 1.33 2001-06-05 18:08:30 f4cfe Exp $ Hamlib is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -372,7 +372,7 @@ int rig_open(RIG *rig) switch(rig->state.rigport.type.rig) { case RIG_PORT_SERIAL: - status = serial_open(&rig->state); + status = serial_open(&rig->state.rigport); if (status != 0) return status; break; diff --git a/src/serial.c b/src/serial.c index 743396be5..cb4380563 100644 --- a/src/serial.c +++ b/src/serial.c @@ -10,7 +10,7 @@ * ham packet softmodem written by Thomas Sailer, HB9JNX. * * - * $Id: serial.c,v 1.11 2001-06-04 17:01:21 f4cfe Exp $ + * $Id: serial.c,v 1.12 2001-06-05 18:08:30 f4cfe Exp $ * * * This program is free software; you can redistribute it and/or @@ -85,11 +85,10 @@ * */ -int serial_open(struct rig_state *rs) { +int serial_open(port_t *rp) { int fd; /* File descriptor for the port */ speed_t speed; /* serial comm speed */ - port_t *rp; #ifdef HAVE_TERMIOS_H struct termios options; @@ -101,11 +100,9 @@ int serial_open(struct rig_state *rs) { #error "No term control supported!" #endif - if (!rs) + if (!rp) return -RIG_EINVAL; - rp = &rs->rigport; - /* * Open in Non-blocking mode. Watch for EAGAIN errors! */ diff --git a/src/serial.h b/src/serial.h index 7e94b32c1..3017cee2c 100644 --- a/src/serial.h +++ b/src/serial.h @@ -6,7 +6,7 @@ * Provides useful routines for read/write serial data for communicating * via serial interface . * - * $Id: serial.h,v 1.7 2001-06-04 17:01:21 f4cfe Exp $ + * $Id: serial.h,v 1.8 2001-06-05 18:08:30 f4cfe Exp $ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -31,7 +31,7 @@ #include -int serial_open(struct rig_state *rs); +int serial_open(port_t *rs); #if 0 int read_sleep(int fd, unsigned char *rxbuffer, int num , int read_delay);