compile portability

git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2881 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.2.11
Stéphane Fillod, F8CFE 2010-04-16 19:08:58 +00:00
rodzic 1404b754fe
commit e41912412f
3 zmienionych plików z 21 dodań i 30 usunięć

Wyświetl plik

@ -1,9 +1,8 @@
/* /*
* Hamlib AOR backend - AR7030 Plus description * Hamlib AOR backend - AR7030 Plus description
* Copyright (c) 2000-2006 by Stephane Fillod & Fritz Melchert * Copyright (c) 2000-2010 by Stephane Fillod & Fritz Melchert
* *
* $Id: $
* *
* This library is free software; you can redistribute it and/or modify * This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as * it under the terms of the GNU Library General Public License as
@ -78,8 +77,7 @@
RIG_OP_TOGGLE ) RIG_OP_TOGGLE )
#define AR7030P_VFO ( RIG_VFO_A | \ #define AR7030P_VFO ( RIG_VFO_A | \
RIG_VFO_B | \ RIG_VFO_B)
RIG_VFO_CURR )
#define AR7030P_STR_CAL { 8, { \ #define AR7030P_STR_CAL { 8, { \
{ 10, -113 }, \ { 10, -113 }, \
@ -359,7 +357,7 @@ static int ar7030p_cleanup( RIG *rig )
*/ */
static int ar7030p_open( RIG * rig ) static int ar7030p_open( RIG * rig )
{ {
int rc = -RIG_OK; int rc = RIG_OK;
int i; int i;
unsigned char v; unsigned char v;
@ -1126,7 +1124,7 @@ static int ar7030p_get_level( RIG * rig, vfo_t vfo, setting_t level,
static int ar7030p_set_vfo( RIG * rig, vfo_t vfo ) static int ar7030p_set_vfo( RIG * rig, vfo_t vfo )
{ {
int rc = -RIG_OK; int rc = RIG_OK;
struct ar7030p_priv_data *priv = (struct ar7030p_priv_data *) rig->state.priv; struct ar7030p_priv_data *priv = (struct ar7030p_priv_data *) rig->state.priv;
assert( NULL != rig ); assert( NULL != rig );
@ -1168,7 +1166,7 @@ static int ar7030p_set_vfo( RIG * rig, vfo_t vfo )
static int ar7030p_get_vfo( RIG * rig, vfo_t * vfo ) static int ar7030p_get_vfo( RIG * rig, vfo_t * vfo )
{ {
int rc = -RIG_OK; int rc = RIG_OK;
struct ar7030p_priv_data *priv = (struct ar7030p_priv_data *) rig->state.priv; struct ar7030p_priv_data *priv = (struct ar7030p_priv_data *) rig->state.priv;
assert( NULL != rig ); assert( NULL != rig );
@ -1230,9 +1228,7 @@ static int ar7030p_get_parm( RIG * rig, setting_t parm, value_t * val )
static int ar7030p_set_mem( RIG * rig, vfo_t vfo, int ch ) static int ar7030p_set_mem( RIG * rig, vfo_t vfo, int ch )
{ {
int rc = -RIG_OK; int rc = RIG_OK;
assert( NULL != rig );
struct ar7030p_priv_data *priv = (struct ar7030p_priv_data *) rig->state.priv; struct ar7030p_priv_data *priv = (struct ar7030p_priv_data *) rig->state.priv;
@ -1252,14 +1248,13 @@ static int ar7030p_set_mem( RIG * rig, vfo_t vfo, int ch )
static int ar7030p_get_mem( RIG * rig, vfo_t vfo, int *ch ) static int ar7030p_get_mem( RIG * rig, vfo_t vfo, int *ch )
{ {
int rc = -RIG_OK; int rc = RIG_OK;
assert( NULL != rig );
assert( NULL != ch );
struct ar7030p_priv_data *priv = (struct ar7030p_priv_data *) rig->state.priv; struct ar7030p_priv_data *priv = (struct ar7030p_priv_data *) rig->state.priv;
channel_t *curr = priv->curr; channel_t *curr = priv->curr;
assert( NULL != ch );
*ch = curr->channel_num; *ch = curr->channel_num;
rig_debug(RIG_DEBUG_VERBOSE, "%s: ch %d\n", __func__, *ch); rig_debug(RIG_DEBUG_VERBOSE, "%s: ch %d\n", __func__, *ch);
@ -1305,7 +1300,7 @@ static int ar7030p_scan( RIG * rig, vfo_t vfo, scan_t scan, int ch )
static int ar7030p_get_dcd( RIG * rig, vfo_t vfo, dcd_t * dcd ) static int ar7030p_get_dcd( RIG * rig, vfo_t vfo, dcd_t * dcd )
{ {
int rc = -RIG_OK; int rc = RIG_OK;
unsigned char v; unsigned char v;
assert( NULL != rig ); assert( NULL != rig );
@ -1542,12 +1537,11 @@ static int ar7030p_get_channel( RIG * rig, channel_t * chan )
unsigned char *p = NULL; unsigned char *p = NULL;
int ch; int ch;
int i; int i;
assert( NULL != rig );
assert( NULL != chan );
struct ar7030p_priv_data *priv = (struct ar7030p_priv_data *)rig->state.priv; struct ar7030p_priv_data *priv = (struct ar7030p_priv_data *)rig->state.priv;
channel_t *curr = priv->curr; channel_t *curr = priv->curr;
assert( NULL != chan );
ch = curr->channel_num; ch = curr->channel_num;
rc = lockRx( rig, LOCK_1 ); rc = lockRx( rig, LOCK_1 );
@ -1652,7 +1646,7 @@ const struct rig_caps ar7030p_caps = {
.mfg_name = "AOR", .mfg_name = "AOR",
.version = "0.1", .version = "0.1",
.copyright = "LGPL", .copyright = "LGPL",
.status = RIG_STATUS_NEW, .status = RIG_STATUS_BETA,
.rig_type = RIG_TYPE_RECEIVER, .rig_type = RIG_TYPE_RECEIVER,
.dcd_type = RIG_DCD_RIG, .dcd_type = RIG_DCD_RIG,
@ -1713,7 +1707,6 @@ const struct rig_caps ar7030p_caps = {
.transceive = RIG_TRN_OFF, .transceive = RIG_TRN_OFF,
.bank_qty = 0, .bank_qty = 0,
.chan_desc_sz = 14, .chan_desc_sz = 14,
.priv = (void *)NULL,
.chan_list = {{0, 399, RIG_MTYPE_MEM, AR7030P_MEM_CAP}, RIG_CHAN_END,}, .chan_list = {{0, 399, RIG_MTYPE_MEM, AR7030P_MEM_CAP}, RIG_CHAN_END,},

Wyświetl plik

@ -1,11 +1,10 @@
/* /*
* Hamlib KIT backend - SoftRock / Si570 AVR USB tuner description * Hamlib KIT backend - SoftRock / Si570 AVR USB tuner description
* Copyright (c) 2009 by Stephane Fillod * Copyright (c) 2009-2010 by Stephane Fillod
* *
* Derived from usbsoftrock-0.5: * Derived from usbsoftrock-0.5:
* Copyright (C) 2009 Andrew Nilsson (andrew.nilsson@gmail.com) * Copyright (C) 2009 Andrew Nilsson (andrew.nilsson@gmail.com)
* *
* $Id: si570avrusb.c fillods Exp $
* *
* This library is free software; you can redistribute it and/or modify * This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as * it under the terms of the GNU General Public License as
@ -26,7 +25,10 @@
#include "config.h" #include "config.h"
#endif #endif
#ifdef HAVE_STDINT_H
#include <stdint.h> #include <stdint.h>
#endif
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <math.h> #include <math.h>

Wyświetl plik

@ -2,7 +2,6 @@
* Hamlib Rotator backend - SPID Rot2Prog * Hamlib Rotator backend - SPID Rot2Prog
* Copyright (c) 2009 by Norvald H. Ryeng, LA6YKA * Copyright (c) 2009 by Norvald H. Ryeng, LA6YKA
* *
* $Id$
* *
* This library is free software; you can redistribute it and/or modify * This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as * it under the terms of the GNU Library General Public License as
@ -121,8 +120,7 @@ static int spid_set_conf(ROT *rot, token_t token, const char *val)
static int spid_rot_set_position(ROT *rot, azimuth_t az, elevation_t el) static int spid_rot_set_position(ROT *rot, azimuth_t az, elevation_t el)
{ {
struct rot_state *rs; struct rot_state *rs = &rot->state;
rs = &rot->state;
struct spid_priv_data *priv = (struct spid_priv_data*)rs->priv; struct spid_priv_data *priv = (struct spid_priv_data*)rs->priv;
int retval; int retval;
int retry_read = 0; int retry_read = 0;
@ -175,8 +173,7 @@ static int spid_rot_set_position(ROT *rot, azimuth_t az, elevation_t el)
static int spid_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el) static int spid_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el)
{ {
struct rot_state *rs; struct rot_state *rs = &rot->state;
rs = &rot->state;
int retval; int retval;
int retry_read = 0; int retry_read = 0;
char posbuf[12]; char posbuf[12];
@ -215,9 +212,8 @@ static int spid_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el)
static int spid_rot_stop(ROT *rot) static int spid_rot_stop(ROT *rot)
{ {
struct rot_state *rs; struct rot_state *rs = &rot->state;
int retval; int retval;
rs = &rot->state;
int retry_read = 0; int retry_read = 0;
char posbuf[12]; char posbuf[12];