static/dynamic build fixes

git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@745 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.1.3
Stéphane Fillod, F8CFE 2001-12-16 11:14:47 +00:00
rodzic dc9487a284
commit 95c6c458dc
29 zmienionych plików z 139 dodań i 223 usunięć

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Alinco backend - main file * Hamlib Alinco backend - main file
* Copyright (c) 2001 by Stephane Fillod * Copyright (c) 2001 by Stephane Fillod
* *
* $Id: alinco.c,v 1.8 2001-10-16 19:19:46 f4cfe Exp $ * $Id: alinco.c,v 1.9 2001-12-16 11:14:46 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 Library General Public License as * it under the terms of the GNU Library General Public License as
@ -34,20 +34,10 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <math.h> #include <math.h>
#if defined(__CYGWIN__) #include <hamlib/rig.h>
# undef HAMLIB_DLL #include <serial.h>
# include <hamlib/rig.h> #include <misc.h>
# include <serial.h> #include <cal.h>
# include <misc.h>
# include <cal.h>
# define HAMLIB_DLL
# include <hamlib/rig_dll.h>
#else
# include <hamlib/rig.h>
# include <serial.h>
# include <misc.h>
# include <cal.h>
#endif
#include "tone_tbl.h" #include "tone_tbl.h"

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Alinco backend - main header * Hamlib Alinco backend - main header
* Copyright (c) 2001 by Stephane Fillod * Copyright (c) 2001 by Stephane Fillod
* *
* $Id: alinco.h,v 1.7 2001-10-16 19:19:46 f4cfe Exp $ * $Id: alinco.h,v 1.8 2001-12-16 11:14:46 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 Library General Public License as * it under the terms of the GNU Library General Public License as
@ -23,16 +23,8 @@
#ifndef _ALINCO_H #ifndef _ALINCO_H
#define _ALINCO_H 1 #define _ALINCO_H 1
#if defined(__CYGWIN__) #include <hamlib/rig.h>
# undef HAMLIB_DLL #include <cal.h>
# include <hamlib/rig.h>
# include <cal.h>
# define HAMLIB_DLL
# include <hamlib/rig_dll.h>
#else
# include <hamlib/rig.h>
# include <cal.h>
#endif
struct alinco_priv_caps { struct alinco_priv_caps {
cal_table_t str_cal; cal_table_t str_cal;
@ -65,7 +57,7 @@ int alinco_get_mem(RIG *rig, vfo_t vfo, int *ch);
extern const struct rig_caps dx77_caps; extern const struct rig_caps dx77_caps;
extern HAMLIB_EXPORT(int) init_alinco(void *be_handle); extern BACKEND_EXPORT(int) init_alinco(void *be_handle);
#endif /* _ALINCO_H */ #endif /* _ALINCO_H */

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib AOR backend - main file * Hamlib AOR backend - main file
* Copyright (c) 2000,2001 by Stephane Fillod * Copyright (c) 2000,2001 by Stephane Fillod
* *
* $Id: aor.c,v 1.14 2001-11-14 18:29:14 f4cfe Exp $ * $Id: aor.c,v 1.15 2001-12-16 11:14:46 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 Library General Public License as * it under the terms of the GNU Library General Public License as
@ -34,18 +34,9 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <math.h> #include <math.h>
#if defined(__CYGWIN__) #include <hamlib/rig.h>
# undef HAMLIB_DLL #include <serial.h>
# include <hamlib/rig.h> #include <misc.h>
# include <serial.h>
# include <misc.h>
# define HAMLIB_DLL
# include <hamlib/rig_dll.h>
#else
# include <hamlib/rig.h>
# include <serial.h>
# include <misc.h>
#endif
#include "aor.h" #include "aor.h"

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib AOR backend - main header * Hamlib AOR backend - main header
* Copyright (c) 2000,2001 by Stephane Fillod * Copyright (c) 2000,2001 by Stephane Fillod
* *
* $Id: aor.h,v 1.7 2001-10-22 20:23:42 f4cfe Exp $ * $Id: aor.h,v 1.8 2001-12-16 11:14:46 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 Library General Public License as * it under the terms of the GNU Library General Public License as
@ -37,7 +37,7 @@ int aor_set_powerstat(RIG *rig, powerstat_t status);
extern const struct rig_caps ar8200_caps; extern const struct rig_caps ar8200_caps;
extern const struct rig_caps ar8000_caps; extern const struct rig_caps ar8000_caps;
extern HAMLIB_EXPORT(int) init_aor(void *be_handle); extern BACKEND_EXPORT(int) init_aor(void *be_handle);
#endif /* _AOR_H */ #endif /* _AOR_H */

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Dummy backend - main header * Hamlib Dummy backend - main header
* Copyright (c) 2001 by Stephane Fillod * Copyright (c) 2001 by Stephane Fillod
* *
* $Id: dummy.h,v 1.3 2001-07-13 19:08:15 f4cfe Exp $ * $Id: dummy.h,v 1.4 2001-12-16 11:14:46 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 Library General Public License as * it under the terms of the GNU Library General Public License as
@ -26,6 +26,6 @@
extern const struct rig_caps dummy_caps; extern const struct rig_caps dummy_caps;
extern HAMLIB_EXPORT(int) init_dummy(void *be_handle); extern BACKEND_EXPORT(int) init_dummy(void *be_handle);
#endif /* _DUMMY_H */ #endif /* _DUMMY_H */

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib CI-V backend - main file * Hamlib CI-V backend - main file
* Copyright (c) 2000,2001 by Stephane Fillod * Copyright (c) 2000,2001 by Stephane Fillod
* *
* $Id: icom.c,v 1.43 2001-11-28 22:10:40 fillods Exp $ * $Id: icom.c,v 1.44 2001-12-16 11:14:46 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 Library General Public License as * it under the terms of the GNU Library General Public License as
@ -34,20 +34,10 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <math.h> #include <math.h>
#if defined(__CYGWIN__) #include <hamlib/rig.h>
# undef HAMLIB_DLL #include <serial.h>
# include <hamlib/rig.h> #include <misc.h>
# include <serial.h> #include <cal.h>
# include <misc.h>
# include <cal.h>
# define HAMLIB_DLL
# include <hamlib/rig_dll.h>
#else
# include <hamlib/rig.h>
# include <serial.h>
# include <misc.h>
# include <cal.h>
#endif
#include "tone_tbl.h" #include "tone_tbl.h"

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib CI-V backend - main header * Hamlib CI-V backend - main header
* Copyright (c) 2000,2001 by Stephane Fillod * Copyright (c) 2000,2001 by Stephane Fillod
* *
* $Id: icom.h,v 1.32 2001-11-28 22:10:40 fillods Exp $ * $Id: icom.h,v 1.33 2001-12-16 11:14:46 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 Library General Public License as * it under the terms of the GNU Library General Public License as
@ -119,8 +119,8 @@ extern const struct rig_caps icall_caps;
extern const struct rig_caps ic275_caps; extern const struct rig_caps ic275_caps;
extern const struct rig_caps ic475_caps; extern const struct rig_caps ic475_caps;
extern HAMLIB_EXPORT(rig_model_t) probe_icom(port_t *p); extern BACKEND_EXPORT(rig_model_t) probe_icom(port_t *p);
extern HAMLIB_EXPORT(int) init_icom(void *be_handle); extern BACKEND_EXPORT(int) init_icom(void *be_handle);
#endif /* _ICOM_H */ #endif /* _ICOM_H */

Wyświetl plik

@ -1,4 +1,4 @@
/* $Id: rig_dll.h,v 1.3 2001-06-15 07:16:16 f4cfe Exp $ */ /* $Id: rig_dll.h,v 1.4 2001-12-16 11:14:46 fillods Exp $ */
#if defined(__CYGWIN__) #if defined(__CYGWIN__)
@ -11,28 +11,37 @@
# endif # endif
# endif # endif
# undef HAMLIB_IMPEXP # undef HAMLIB_IMPEXP
# undef BACKEND_IMPEXP
# undef HAMLIB_API # undef HAMLIB_API
# undef HAMLIB_EXPORT(type) # undef HAMLIB_EXPORT(type)
# undef HAMLIB_EXPORT_VAR(type) # undef HAMLIB_EXPORT_VAR(type)
# if defined(HAMLIB_DLL) # if defined(HAMLIB_DLL) && defined(IN_HAMLIB)
/* building a DLL */ /* building a DLL */
# define HAMLIB_IMPEXP __declspec(dllexport) # define HAMLIB_IMPEXP __declspec(dllexport)
# define BACKEND_IMPEXP __declspec(dllexport)
# elif defined(HAMLIB_STATIC) || defined(ALL_STATIC) # elif defined(HAMLIB_STATIC) || defined(ALL_STATIC)
/* building or linking to a static library */ /* building or linking to a static library */
# define HAMLIB_IMPEXP # define HAMLIB_IMPEXP
# define BACKEND_IMPEXP
# else # else
/* linking to the DLL */ /* linking to the DLL */
# define HAMLIB_IMPEXP __declspec(dllimport) # define HAMLIB_IMPEXP __declspec(dllimport)
# define BACKEND_IMPEXP __declspec(dllexport)
# endif # endif
# define HAMLIB_API __cdecl # define HAMLIB_API __cdecl
# define HAMLIB_EXPORT(type) HAMLIB_IMPEXP type HAMLIB_API # define HAMLIB_EXPORT(type) HAMLIB_IMPEXP type HAMLIB_API
# define HAMLIB_EXPORT_VAR(type) HAMLIB_IMPEXP type # define HAMLIB_EXPORT_VAR(type) HAMLIB_IMPEXP type
# define BACKEND_EXPORT(type) BACKEND_IMPEXP type HAMLIB_API
# define BACKEND_EXPORT_VAR(type) BACKEND_IMPEXP type
#endif #endif
/* Take care of non-cygwin platforms */ /* Take care of non-cygwin platforms */
#if !defined(HAMLIB_IMPEXP) #if !defined(HAMLIB_IMPEXP)
# define HAMLIB_IMPEXP # define HAMLIB_IMPEXP
#endif #endif
#if !defined(BACKEND_IMPEXP)
# define BACKEND_IMPEXP
#endif
#if !defined(HAMLIB_API) #if !defined(HAMLIB_API)
# define HAMLIB_API # define HAMLIB_API
#endif #endif
@ -42,3 +51,9 @@
#if !defined(HAMLIB_EXPORT_VAR) #if !defined(HAMLIB_EXPORT_VAR)
# define HAMLIB_EXPORT_VAR(type) HAMLIB_IMPEXP type # define HAMLIB_EXPORT_VAR(type) HAMLIB_IMPEXP type
#endif #endif
#if !defined(BACKEND_EXPORT)
# define BACKEND_EXPORT(type) BACKEND_IMPEXP type HAMLIB_API
#endif
#if !defined(BACKEND_EXPORT_VAR)
# define BACKEND_EXPORT_VAR(type) BACKEND_IMPEXP type
#endif

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Kenwood backend - main file * Hamlib Kenwood backend - main file
* Copyright (c) 2000,2001 by Stephane Fillod * Copyright (c) 2000,2001 by Stephane Fillod
* *
* $Id: kenwood.c,v 1.19 2001-12-12 22:03:29 fillods Exp $ * $Id: kenwood.c,v 1.20 2001-12-16 11:14:46 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 Library General Public License as * it under the terms of the GNU Library General Public License as
@ -34,18 +34,9 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <math.h> #include <math.h>
#if defined(__CYGWIN__) #include <hamlib/rig.h>
# undef HAMLIB_DLL #include <serial.h>
# include <hamlib/rig.h> #include <misc.h>
# include <serial.h>
# include <misc.h>
# define HAMLIB_DLL
# include <hamlib/rig_dll.h>
#else
# include <hamlib/rig.h>
# include <serial.h>
# include <misc.h>
#endif
#include "kenwood.h" #include "kenwood.h"

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Kenwood backend - main header * Hamlib Kenwood backend - main header
* Copyright (c) 2000,2001 by Stephane Fillod * Copyright (c) 2000,2001 by Stephane Fillod
* *
* $Id: kenwood.h,v 1.12 2001-12-11 21:58:37 fillods Exp $ * $Id: kenwood.h,v 1.13 2001-12-16 11:14:46 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 Library General Public License as * it under the terms of the GNU Library General Public License as
@ -62,8 +62,8 @@ extern const struct rig_caps thd7a_caps;
extern const struct rig_caps thf7a_caps; extern const struct rig_caps thf7a_caps;
extern const struct rig_caps thf7e_caps; extern const struct rig_caps thf7e_caps;
extern HAMLIB_EXPORT(int) init_kenwood(void *be_handle); extern BACKEND_EXPORT(int) init_kenwood(void *be_handle);
extern HAMLIB_EXPORT(rig_model_t) probe_kenwood(port_t *port); extern BACKEND_EXPORT(rig_model_t) probe_kenwood(port_t *port);
#endif /* _KENWOOD_H */ #endif /* _KENWOOD_H */

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib PCR backend - main file * Hamlib PCR backend - main file
* Copyright (c) 2001 by Stephane Fillod * Copyright (c) 2001 by Stephane Fillod
* *
* $Id: pcr.c,v 1.9 2001-07-13 19:08:15 f4cfe Exp $ * $Id: pcr.c,v 1.10 2001-12-16 11:14:46 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 Library General Public License as * it under the terms of the GNU Library General Public License as
@ -34,18 +34,9 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <math.h> #include <math.h>
#if defined(__CYGWIN__) #include <hamlib/rig.h>
# undef HAMLIB_DLL #include <serial.h>
# include <hamlib/rig.h> #include <misc.h>
# include <serial.h>
# include <misc.h>
# define HAMLIB_DLL
# include <hamlib/rig_dll.h>
#else
# include <hamlib/rig.h>
# include <serial.h>
# include <misc.h>
#endif
#include "pcr.h" #include "pcr.h"

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib PCR backend - main header * Hamlib PCR backend - main header
* Copyright (c) 2001 by Stephane Fillod * Copyright (c) 2001 by Stephane Fillod
* *
* $Id: pcr.h,v 1.4 2001-07-13 19:08:15 f4cfe Exp $ * $Id: pcr.h,v 1.5 2001-12-16 11:14:46 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 Library General Public License as * it under the terms of the GNU Library General Public License as
@ -44,7 +44,7 @@ const char *pcr_get_info(RIG *rig);
extern const struct rig_caps pcr1000_caps; extern const struct rig_caps pcr1000_caps;
extern const struct rig_caps pcr100_caps; extern const struct rig_caps pcr100_caps;
extern HAMLIB_EXPORT(int) init_pcr(void *be_handle); extern BACKEND_EXPORT(int) init_pcr(void *be_handle);
#endif /* _PCR_H */ #endif /* _PCR_H */

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib RPC backend - main file * Hamlib RPC backend - main file
* Copyright (c) 2001 by Stephane Fillod * Copyright (c) 2001 by Stephane Fillod
* *
* $Id: rpcrig_backend.c,v 1.1 2001-10-16 19:29:03 f4cfe Exp $ * $Id: rpcrig_backend.c,v 1.2 2001-12-16 11:14:46 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 Library General Public License as * it under the terms of the GNU Library General Public License as
@ -34,18 +34,9 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <math.h> #include <math.h>
#if defined(__CYGWIN__) #include <hamlib/rig.h>
# undef HAMLIB_DLL #include <serial.h>
# include <hamlib/rig.h> #include <misc.h>
# include <serial.h>
# include <misc.h>
# define HAMLIB_DLL
# include <hamlib/rig_dll.h>
#else
# include <hamlib/rig.h>
# include <serial.h>
# include <misc.h>
#endif
#include <rpc/rpc.h> #include <rpc/rpc.h>
#include "rpcrig.h" #include "rpcrig.h"
@ -54,12 +45,12 @@
/********************************************************************/ /********************************************************************/
void freq_t2freq_s(freq_t freqt, freq_s *freqs) static void freq_t2freq_s(freq_t freqt, freq_s *freqs)
{ {
freqs->f1 = freqt & 0xffffffff; freqs->f1 = freqt & 0xffffffff;
freqs->f2 = (freqt>>32) & 0xffffffff; freqs->f2 = (freqt>>32) & 0xffffffff;
} }
freq_t freq_s2freq_t(freq_s *freqs) static freq_t freq_s2freq_t(freq_s *freqs)
{ {
return freqs->f1 | ((freq_t)freqs->f2 << 32); return freqs->f1 | ((freq_t)freqs->f2 << 32);
} }
@ -117,6 +108,7 @@ static int rpcrig_open(RIG *rig)
result = getmodel_1(NULL, priv->cl); result = getmodel_1(NULL, priv->cl);
if (result == NULL) { if (result == NULL) {
clnt_perror(priv->cl, server); clnt_perror(priv->cl, server);
clnt_destroy(priv->cl);
return -RIG_EPROTO; return -RIG_EPROTO;
} }
model = *result; model = *result;
@ -126,7 +118,7 @@ static int rpcrig_open(RIG *rig)
/* /*
* TODO: get these from RPC instead * TODO: get these from RPC instead
*/ */
#if 0 #if 1
rs->vfo_list = 0; rs->vfo_list = 0;
for (i=0; i<FRQRANGESIZ; i++) { for (i=0; i<FRQRANGESIZ; i++) {
if (rs->rx_range_list[i].start != 0 && if (rs->rx_range_list[i].start != 0 &&

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib RPC backend - main header * Hamlib RPC backend - main header
* Copyright (c) 2001 by Stephane Fillod * Copyright (c) 2001 by Stephane Fillod
* *
* $Id: rpcrig_backend.h,v 1.1 2001-10-16 19:29:03 f4cfe Exp $ * $Id: rpcrig_backend.h,v 1.2 2001-12-16 11:14:46 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 Library General Public License as * it under the terms of the GNU Library General Public License as
@ -26,6 +26,6 @@
extern const struct rig_caps rpcrig_caps; extern const struct rig_caps rpcrig_caps;
extern HAMLIB_EXPORT(int) init_rpcrig(void *be_handle); extern BACKEND_EXPORT(int) init_rpcrig(void *be_handle);
#endif /* _RPCRIG_H */ #endif /* _RPCRIG_H */

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib RPC server - procedures * Hamlib RPC server - procedures
* Copyright (c) 2001 by Stephane Fillod * Copyright (c) 2001 by Stephane Fillod
* *
* $Id: rpcrig_proc.c,v 1.1 2001-10-16 19:29:03 f4cfe Exp $ * $Id: rpcrig_proc.c,v 1.2 2001-12-16 11:14:46 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 Library General Public License as * it under the terms of the GNU Library General Public License as
@ -38,12 +38,12 @@
extern RIG *the_rpc_rig; extern RIG *the_rpc_rig;
void freq_t2freq_s(freq_t freqt, freq_s *freqs) static void freq_t2freq_s(freq_t freqt, freq_s *freqs)
{ {
freqs->f1 = freqt & 0xffffffff; freqs->f1 = freqt & 0xffffffff;
freqs->f2 = (freqt>>32) & 0xffffffff; freqs->f2 = (freqt>>32) & 0xffffffff;
} }
freq_t freq_s2freq_t(freq_s *freqs) static freq_t freq_s2freq_t(freq_s *freqs)
{ {
return freqs->f1 | ((freq_t)freqs->f2 << 32); return freqs->f1 | ((freq_t)freqs->f2 << 32);
} }

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Interface - calibration routines * Hamlib Interface - calibration routines
* Copyright (c) 2000,2001 by Stephane Fillod and Frank Singleton * Copyright (c) 2000,2001 by Stephane Fillod and Frank Singleton
* *
* $Id: cal.c,v 1.3 2001-07-13 19:08:15 f4cfe Exp $ * $Id: cal.c,v 1.4 2001-12-16 11:14:46 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 Library General Public License as * it under the terms of the GNU Library General Public License as
@ -24,7 +24,6 @@
#include "config.h" #include "config.h"
#endif #endif
#define HAMLIB_DLL
#include <hamlib/rig.h> #include <hamlib/rig.h>
#include "cal.h" #include "cal.h"

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Interface - configuration interface * Hamlib Interface - configuration interface
* Copyright (c) 2000,2001 by Stephane Fillod and Frank Singleton * Copyright (c) 2000,2001 by Stephane Fillod and Frank Singleton
* *
* $Id: conf.c,v 1.2 2001-07-25 21:58:15 f4cfe Exp $ * $Id: conf.c,v 1.3 2001-12-16 11:14:46 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 Library General Public License as * it under the terms of the GNU Library General Public License as
@ -30,7 +30,6 @@
#include <string.h> /* String function definitions */ #include <string.h> /* String function definitions */
#include <unistd.h> /* UNIX standard function definitions */ #include <unistd.h> /* UNIX standard function definitions */
#define HAMLIB_DLL
#include <hamlib/rig.h> #include <hamlib/rig.h>
#include "conf.h" #include "conf.h"

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Interface - event handling * Hamlib Interface - event handling
* Copyright (c) 2000,2001 by Stephane Fillod and Frank Singleton * Copyright (c) 2000,2001 by Stephane Fillod and Frank Singleton
* *
* $Id: event.c,v 1.10 2001-08-22 21:10:17 f4cfe Exp $ * $Id: event.c,v 1.11 2001-12-16 11:14:46 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 Library General Public License as * it under the terms of the GNU Library General Public License as
@ -37,7 +37,6 @@
#include <errno.h> #include <errno.h>
#define HAMLIB_DLL
#include <hamlib/rig.h> #include <hamlib/rig.h>
#include "event.h" #include "event.h"

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Interface - provides registering for dynamically loadable backends. * Hamlib Interface - provides registering for dynamically loadable backends.
* Copyright (c) 2000,2001 by Stephane Fillod and Frank Singleton * Copyright (c) 2000,2001 by Stephane Fillod and Frank Singleton
* *
* $Id: register.c,v 1.10 2001-09-19 21:58:33 f4cfe Exp $ * $Id: register.c,v 1.11 2001-12-16 11:14:46 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 Library General Public License as * it under the terms of the GNU Library General Public License as
@ -34,7 +34,6 @@
/* This is libtool's dl wrapper */ /* This is libtool's dl wrapper */
#include <ltdl.h> #include <ltdl.h>
#define HAMLIB_DLL
#include <hamlib/rig.h> #include <hamlib/rig.h>
@ -282,13 +281,12 @@ int rig_load_backend(const char *be_name)
/* /*
* lt_dlinit may be called several times * lt_dlinit may be called several times
*/ */
#ifdef HAVE_PRELOADED_SYMBOLS
LTDL_SET_PRELOADED_SYMBOLS(); LTDL_SET_PRELOADED_SYMBOLS();
#endif
status = lt_dlinit(); status = lt_dlinit();
if (status) { if (status) {
rig_debug(RIG_DEBUG_ERR, "rig_backend_load: lt_dlinit for %s " rig_debug(RIG_DEBUG_ERR, "rig_backend_load: lt_dlinit for %s "
"failed: %d\n", be_name, status); "failed: %s\n", be_name, lt_dlerror());
return -RIG_EINTERNAL; return -RIG_EINTERNAL;
} }
@ -297,9 +295,13 @@ int rig_load_backend(const char *be_name)
/* /*
* add hamlib directory here * add hamlib directory here
*/ */
#ifdef HAMLIB_DLL
snprintf (libname, sizeof (libname), PREFIX"%s"POSTFIX, be_name); snprintf (libname, sizeof (libname), PREFIX"%s"POSTFIX, be_name);
be_handle = lt_dlopen (libname); be_handle = lt_dlopen (libname);
#else
be_handle = lt_dlopen (NULL);
#endif
if (!be_handle) { if (!be_handle) {
rig_debug(RIG_DEBUG_ERR, "rig: lt_dlopen(\"%s\") failed (%s)\n", rig_debug(RIG_DEBUG_ERR, "rig: lt_dlopen(\"%s\") failed (%s)\n",
@ -307,7 +309,6 @@ int rig_load_backend(const char *be_name)
return -RIG_EINVAL; return -RIG_EINVAL;
} }
strncat(initfname, be_name, MAXFUNCNAMELEN); strncat(initfname, be_name, MAXFUNCNAMELEN);
be_init = (int (*)(rig_ptr_t)) lt_dlsym (be_handle, initfname); be_init = (int (*)(rig_ptr_t)) lt_dlsym (be_handle, initfname);
if (!be_init) { if (!be_init) {

Wyświetl plik

@ -4,7 +4,7 @@
* Parts of the PTT handling are derived from soundmodem, an excellent * Parts of the PTT handling are derived from soundmodem, an excellent
* ham packet softmodem written by Thomas Sailer, HB9JNX. * ham packet softmodem written by Thomas Sailer, HB9JNX.
* *
* $Id: serial.c,v 1.19 2001-12-15 03:13:39 aa1vl Exp $ * $Id: serial.c,v 1.20 2001-12-16 11:14:46 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 Library General Public License as * it under the terms of the GNU Library General Public License as
@ -57,7 +57,6 @@
#include <winbase.h> #include <winbase.h>
#endif #endif
#define HAMLIB_DLL
#include <hamlib/rig.h> #include <hamlib/rig.h>
#include "serial.h" #include "serial.h"
#include "misc.h" #include "misc.h"

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Interface - CTCSS and DCS tables * Hamlib Interface - CTCSS and DCS tables
* Copyright (c) 2000,2001 by Stephane Fillod and Frank Singleton * Copyright (c) 2000,2001 by Stephane Fillod and Frank Singleton
* *
* $Id: tone_tbl.h,v 1.1 2001-10-16 19:15:52 f4cfe Exp $ * $Id: tone_tbl.h,v 1.2 2001-12-16 11:14:46 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 Library General Public License as * it under the terms of the GNU Library General Public License as
@ -20,6 +20,9 @@
* *
*/ */
#ifndef _TONE_TBL_H
#define _TONE_TBL_H 1
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif #endif
@ -27,11 +30,27 @@
#include <hamlib/rig.h> #include <hamlib/rig.h>
/*
* Under win32, dll backends cannot link against exported variables
* in other dll (or I don't know how).
* Anyway, we got to trick it
*
* The TBL_SCOPE is necessary to the tables are not static
* in hamlib (exported).
* --SF
*/
#if defined(IN_HAMLIB) || defined(__CYGWIN__)
#ifdef __CYGWIN__
#define TBL_SCOPE static
#else
#define TBL_SCOPE
#endif
/** /**
* 52 CTCSS sub-audible tones * 52 CTCSS sub-audible tones
*/ */
#if defined(HAMLIB_DLL) || defined(__CYGWIN__) TBL_SCOPE const tone_t full_ctcss_list[] = {
const tone_t full_ctcss_list[] = {
600, 670, 693, 719, 744, 770, 797, 825, 854, 885, 915, 600, 670, 693, 719, 744, 770, 797, 825, 854, 885, 915,
948, 974, 1000, 1035, 1072, 1109, 1148, 1188, 1200, 1230, 1273, 948, 974, 1000, 1035, 1072, 1109, 1148, 1188, 1200, 1230, 1273,
1318, 1365, 1413, 1462, 1514, 1567, 1598, 1622, 1655, 1679, 1318, 1365, 1413, 1462, 1514, 1567, 1598, 1622, 1655, 1679,
@ -47,7 +66,7 @@ const tone_t full_ctcss_list[] = {
* backends depend on it. If you need to, create a copy for your * backends depend on it. If you need to, create a copy for your
* own caps. --SF * own caps. --SF
*/ */
const tone_t common_ctcss_list[] = { TBL_SCOPE const tone_t common_ctcss_list[] = {
670, 693, 719, 744, 770, 797, 825, 854, 885, 915, 670, 693, 719, 744, 770, 797, 825, 854, 885, 915,
948, 974, 1000, 1035, 1072, 1109, 1148, 1188, 1230, 1273, 948, 974, 1000, 1035, 1072, 1109, 1148, 1188, 1230, 1273,
1318, 1365, 1413, 1462, 1514, 1567, 1598, 1622, 1655, 1679, 1318, 1365, 1413, 1462, 1514, 1567, 1598, 1622, 1655, 1679,
@ -59,7 +78,7 @@ const tone_t common_ctcss_list[] = {
/** /**
* 106 DCS codes * 106 DCS codes
*/ */
const tone_t full_dcs_list[] = { TBL_SCOPE const tone_t full_dcs_list[] = {
17, 23, 25, 26, 31, 32, 36, 43, 47, 50, 51, 53, 17, 23, 25, 26, 31, 32, 36, 43, 47, 50, 51, 53,
54, 65, 71, 72, 73, 74, 114, 115, 116, 122, 125, 131, 54, 65, 71, 72, 73, 74, 114, 115, 116, 122, 125, 131,
132, 134, 143, 145, 152, 155, 156, 162, 165, 172, 174, 205, 132, 134, 143, 145, 152, 155, 156, 162, 165, 172, 174, 205,
@ -72,9 +91,10 @@ const tone_t full_dcs_list[] = {
0, 0,
}; };
#else #else
extern const tone_t full_ctcss_list[]; extern const HAMLIB_EXPORT_VAR(tone_t) full_ctcss_list[];
extern const tone_t common_ctcss_list[]; extern const HAMLIB_EXPORT_VAR(tone_t) common_ctcss_list[];
extern const tone_t full_dcs_list[]; extern const HAMLIB_EXPORT_VAR(tone_t) full_dcs_list[];
#endif /* HAMLIB_DLL || __CYGWIN__ */ #endif /* HAMLIB_DLL || __CYGWIN__ */
#endif /* _TONE_TBL_H */

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Tentec backend - main file * Hamlib Tentec backend - main file
* Copyright (c) 2001 by Stephane Fillod * Copyright (c) 2001 by Stephane Fillod
* *
* $Id: tentec.c,v 1.1 2001-07-14 16:42:48 f4cfe Exp $ * $Id: tentec.c,v 1.2 2001-12-16 11:14:46 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 Library General Public License as * it under the terms of the GNU Library General Public License as
@ -34,20 +34,10 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <math.h> #include <math.h>
#if defined(__CYGWIN__) #include <hamlib/rig.h>
# undef HAMLIB_DLL #include <serial.h>
# include <hamlib/rig.h> #include <misc.h>
# include <serial.h> #include <cal.h>
# include <misc.h>
# include <cal.h>
# define HAMLIB_DLL
# include <hamlib/rig_dll.h>
#else
# include <hamlib/rig.h>
# include <serial.h>
# include <misc.h>
# include <cal.h>
#endif
#include "tentec.h" #include "tentec.h"
@ -352,7 +342,7 @@ int tentec_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
/* FIXME: support also separate Lineout setting /* FIXME: support also separate Lineout setting
* -> need to create RIG_LEVEL_LINEOUT ? * -> need to create RIG_LEVEL_LINEOUT ?
*/ */
cmd_len = sprintf(cmdbuf, "C%c%c" EOM, 0, (int)rint(val.f*63)); cmd_len = sprintf(cmdbuf, "C%c%c" EOM, 0, (int)(val.f*63));
retval = write_block(&rs->rigport, cmdbuf, cmd_len); retval = write_block(&rs->rigport, cmdbuf, cmd_len);
if (retval == RIG_OK) if (retval == RIG_OK)
priv->lnvol = priv->spkvol = val.f; priv->lnvol = priv->spkvol = val.f;

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Tentec backend - main header * Hamlib Tentec backend - main header
* Copyright (c) 2001 by Stephane Fillod * Copyright (c) 2001 by Stephane Fillod
* *
* $Id: tentec.h,v 1.1 2001-07-14 16:42:48 f4cfe Exp $ * $Id: tentec.h,v 1.2 2001-12-16 11:14:46 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 Library General Public License as * it under the terms of the GNU Library General Public License as
@ -23,16 +23,8 @@
#ifndef _TENTEC_H #ifndef _TENTEC_H
#define _TENTEC_H 1 #define _TENTEC_H 1
#if defined(__CYGWIN__) #include <hamlib/rig.h>
# undef HAMLIB_DLL #include <cal.h>
# include <hamlib/rig.h>
# include <cal.h>
# define HAMLIB_DLL
# include <hamlib/rig_dll.h>
#else
# include <hamlib/rig.h>
# include <cal.h>
#endif
struct tentec_priv_caps { struct tentec_priv_caps {
cal_table_t str_cal; cal_table_t str_cal;
@ -68,7 +60,7 @@ const char* tentec_get_info(RIG *rig);
extern const struct rig_caps rx320_caps; extern const struct rig_caps rx320_caps;
extern HAMLIB_EXPORT(int) init_tentec(void *be_handle); extern BACKEND_EXPORT(int) init_tentec(void *be_handle);
#endif /* _TENTEC_H */ #endif /* _TENTEC_H */

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Uniden backend - main file * Hamlib Uniden backend - main file
* Copyright (c) 2001 by Stephane Fillod * Copyright (c) 2001 by Stephane Fillod
* *
* $Id: uniden.c,v 1.1 2001-07-14 16:45:40 f4cfe Exp $ * $Id: uniden.c,v 1.2 2001-12-16 11:14:46 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 Library General Public License as * it under the terms of the GNU Library General Public License as
@ -34,18 +34,9 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <math.h> #include <math.h>
#if defined(__CYGWIN__) #include <hamlib/rig.h>
# undef HAMLIB_DLL #include <serial.h>
# include <hamlib/rig.h> #include <misc.h>
# include <serial.h>
# include <misc.h>
# define HAMLIB_DLL
# include <hamlib/rig_dll.h>
#else
# include <hamlib/rig.h>
# include <serial.h>
# include <misc.h>
#endif
#include "uniden.h" #include "uniden.h"

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Uniden backend - main header * Hamlib Uniden backend - main header
* Copyright (c) 2001 by Stephane Fillod * Copyright (c) 2001 by Stephane Fillod
* *
* $Id: uniden.h,v 1.1 2001-07-14 16:45:40 f4cfe Exp $ * $Id: uniden.h,v 1.2 2001-12-16 11:14:46 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 Library General Public License as * it under the terms of the GNU Library General Public License as
@ -23,16 +23,8 @@
#ifndef _UNIDEN_H #ifndef _UNIDEN_H
#define _UNIDEN_H 1 #define _UNIDEN_H 1
#if defined(__CYGWIN__) #include <hamlib/rig.h>
# undef HAMLIB_DLL #include <cal.h>
# include <hamlib/rig.h>
# include <cal.h>
# define HAMLIB_DLL
# include <hamlib/rig_dll.h>
#else
# include <hamlib/rig.h>
# include <cal.h>
#endif
int uniden_set_freq(RIG *rig, vfo_t vfo, freq_t freq); int uniden_set_freq(RIG *rig, vfo_t vfo, freq_t freq);
@ -40,7 +32,7 @@ int uniden_set_mem(RIG *rig, vfo_t vfo, int ch);
extern const struct rig_caps bc895_caps; extern const struct rig_caps bc895_caps;
extern int init_uniden(void *be_handle); extern BACKEND_EXPORT(int) init_uniden(void *be_handle);
#endif /* _UNIDEN_H */ #endif /* _UNIDEN_H */

Wyświetl plik

@ -3,7 +3,7 @@
* Copyright (C) 2001 pab@users.sourceforge.net * Copyright (C) 2001 pab@users.sourceforge.net
* Derived from hamlib code (C) 2000,2001 Stephane Fillod. * Derived from hamlib code (C) 2000,2001 Stephane Fillod.
* *
* $Id: winradio.c,v 1.14 2001-07-25 21:59:55 f4cfe Exp $ * $Id: winradio.c,v 1.15 2001-12-16 11:14:46 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 Library General Public License as * it under the terms of the GNU Library General Public License as
@ -35,18 +35,9 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <math.h> #include <math.h>
#if defined(__CYGWIN__) #include <hamlib/rig.h>
# undef HAMLIB_DLL #include <serial.h>
# include <hamlib/rig.h> #include <misc.h>
# include <serial.h>
# include <misc.h>
# define HAMLIB_DLL
# include <hamlib/rig_dll.h>
#else
# include <hamlib/rig.h>
# include <serial.h>
# include <misc.h>
#endif
#include "winradio.h" #include "winradio.h"

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib WiNRADiO backend - main header * Hamlib WiNRADiO backend - main header
* Copyright (c) 2000,2001 by Stephane Fillod * Copyright (c) 2000,2001 by Stephane Fillod
* *
* $Id: winradio.h,v 1.5 2001-07-13 19:08:15 f4cfe Exp $ * $Id: winradio.h,v 1.6 2001-12-16 11:14:47 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 Library General Public License as * it under the terms of the GNU Library General Public License as
@ -46,6 +46,6 @@ extern const struct rig_caps wr3150_caps;
extern const struct rig_caps wr3500_caps; extern const struct rig_caps wr3500_caps;
extern const struct rig_caps wr3700_caps; extern const struct rig_caps wr3700_caps;
extern HAMLIB_EXPORT(int) init_winradio(void *be_handle); extern BACKEND_EXPORT(int) init_winradio(void *be_handle);
#endif /* _WINRADIO_H */ #endif /* _WINRADIO_H */

Wyświetl plik

@ -7,7 +7,7 @@
* via serial interface to a Yaesu rig * via serial interface to a Yaesu rig
* *
* *
* $Id: yaesu.c,v 1.4 2001-12-15 03:23:14 aa1vl Exp $ * $Id: yaesu.c,v 1.5 2001-12-16 11:14:47 fillods Exp $
* *
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
@ -36,18 +36,9 @@
#include <termios.h> /* POSIX terminal control definitions */ #include <termios.h> /* POSIX terminal control definitions */
#include <sys/ioctl.h> #include <sys/ioctl.h>
#if defined(__CYGWIN__) #include <hamlib/rig.h>
# undef HAMLIB_DLL #include "serial.h"
# include <hamlib/rig.h> #include "misc.h"
# include "serial.h"
# include "misc.h"
# define HAMLIB_DLL
# include <hamlib/rig_dll.h>
#else
# include <hamlib/rig.h>
# include "serial.h"
# include "misc.h"
#endif
#include "yaesu.h" #include "yaesu.h"
#include "ft747.h" #include "ft747.h"

Wyświetl plik

@ -4,7 +4,7 @@
* yaesu.h - (C) Frank Singleton 2000 (vk3fcs@ix.netcom.com) * yaesu.h - (C) Frank Singleton 2000 (vk3fcs@ix.netcom.com)
* Common yaesu declarations for hamlib * Common yaesu declarations for hamlib
* *
* $Id: yaesu.h,v 1.7 2001-12-15 03:23:14 aa1vl Exp $ * $Id: yaesu.h,v 1.8 2001-12-16 11:14:47 fillods Exp $
* *
* *
* *
@ -49,6 +49,6 @@ extern const struct rig_caps ft747_caps;
extern const struct rig_caps ft817_caps; extern const struct rig_caps ft817_caps;
extern const struct rig_caps ft847_caps; extern const struct rig_caps ft847_caps;
extern HAMLIB_EXPORT(int) init_yaesu(void *be_handle); extern BACKEND_EXPORT(int) init_yaesu(void *be_handle);
#endif /* _YAESU_H */ #endif /* _YAESU_H */