more portability stuff

git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@541 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.1.2
Stéphane Fillod, F8CFE 2001-06-11 00:41:28 +00:00
rodzic 593c4a6488
commit 9c32855611
15 zmienionych plików z 220 dodań i 137 usunięć

Wyświetl plik

@ -1,6 +1,6 @@
lib_LTLIBRARIES = libhamlib-alinco.la lib_LTLIBRARIES = libhamlib-alinco.la
libhamlib_alinco_la_SOURCES = dx77.c alinco.c libhamlib_alinco_la_SOURCES = dx77.c alinco.c
libhamlib_alinco_la_LDFLAGS = -avoid-version # -module libhamlib_alinco_la_LDFLAGS = -module -avoid-version
libhamlib_alinco_la_LIBADD = ../src/libhamlib.la libhamlib_alinco_la_LIBADD = ../src/libhamlib.la
lib_LIBRARIES = libhamlib-alinco.a lib_LIBRARIES = libhamlib-alinco.a

Wyświetl plik

@ -1,6 +1,12 @@
AORSRCLIST = ar8200.c
lib_LTLIBRARIES = libhamlib-aor.la lib_LTLIBRARIES = libhamlib-aor.la
libhamlib_aor_la_SOURCES = ar8200.c aor.c libhamlib_aor_la_SOURCES = $(AORSRCLIST) aor.c
libhamlib_aor_la_LDFLAGS = -avoid-version # -module libhamlib_aor_la_LDFLAGS = -module -avoid-version
libhamlib_aor_la_LIBADD = ../src/libhamlib.la
lib_LIBRARIES = libhamlib-aor.a lib_LIBRARIES = libhamlib-aor.a
libhamlib_aor_a_SOURCES = ar8200.c aor.c libhamlib_aor_a_SOURCES = $(AORSRCLIST) aor.c
libhamlib_aor_a_LIBADD = ../src/libhamlib.la
noinst_HEADERS = aor.h noinst_HEADERS = aor.h

Wyświetl plik

@ -81,6 +81,7 @@ dnl Substitute INCLTDL and LIBLTDL in the Makefiles
AC_SUBST(INCLTDL) AC_SUBST(INCLTDL)
AC_SUBST(LIBLTDL) AC_SUBST(LIBLTDL)
dnl Check for dlopen support dnl Check for dlopen support
AC_LIBTOOL_WIN32_DLL
AC_LIBTOOL_DLOPEN AC_LIBTOOL_DLOPEN
dnl Configure libtool dnl Configure libtool
AM_PROG_LIBTOOL AM_PROG_LIBTOOL

Wyświetl plik

@ -1,6 +1,10 @@
lib_LTLIBRARIES = libhamlib-dummy.la lib_LTLIBRARIES = libhamlib-dummy.la
libhamlib_dummy_la_SOURCES = dummy.c libhamlib_dummy_la_SOURCES = dummy.c
libhamlib_dummy_la_LDFLAGS = -avoid-version # -module libhamlib_dummy_la_LDFLAGS = -module -avoid-version
libhamlib_dummy_la_LIBADD = ../src/libhamlib.la
lib_LIBRARIES = libhamlib-dummy.a lib_LIBRARIES = libhamlib-dummy.a
libhamlib_dummy_a_SOURCES = dummy.c libhamlib_dummy_a_SOURCES = dummy.c
libhamlib_dummy_a_LIBADD = ../src/libhamlib.la
noinst_HEADERS = dummy.h noinst_HEADERS = dummy.h

Wyświetl plik

@ -1,6 +1,12 @@
ICOMSRCLIST = ic706.c icr8500.c icall.c
lib_LTLIBRARIES = libhamlib-icom.la lib_LTLIBRARIES = libhamlib-icom.la
libhamlib_icom_la_SOURCES = ic706.c icr8500.c icall.c icom.c frame.c libhamlib_icom_la_SOURCES = $(ICOMSRCLIST) icom.c frame.c
libhamlib_icom_la_LDFLAGS = -avoid-version # -module libhamlib_icom_la_LDFLAGS = -module -avoid-version
libhamlib_icom_la_LIBADD = ../src/libhamlib.la
lib_LIBRARIES = libhamlib-icom.a lib_LIBRARIES = libhamlib-icom.a
libhamlib_icom_a_SOURCES = ic706.c icr8500.c icall.c icom.c frame.c libhamlib_icom_a_SOURCES = $(ICOMSRCLIST) icom.c frame.c
libhamlib_icom_a_LIBADD = ../src/libhamlib.la
noinst_HEADERS = frame.h icom.h icom_defs.h noinst_HEADERS = frame.h icom.h icom_defs.h

Wyświetl plik

@ -5,7 +5,7 @@
* will be used for obtaining rig capabilities. * will be used for obtaining rig capabilities.
* *
* *
* $Id: rig.h,v 1.36 2001-06-10 00:43:00 f4cfe Exp $ * $Id: rig.h,v 1.37 2001-06-11 00:41:28 f4cfe Exp $
* *
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
@ -31,17 +31,68 @@
#include <stdio.h> /* required for FILE definition */ #include <stdio.h> /* required for FILE definition */
#include <sys/time.h> /* required for struct timeval */ #include <sys/time.h> /* required for struct timeval */
#ifdef __cplusplus /* At some point, cygwin will stop defining __CYGWIN32__, but b19 and
extern "C" { * * earlier do not define __CYGWIN__. This snippit allows us to check
* * for __CYGWIN32__ reliably for both old and (probable) future releases.
* */
#ifdef __CYGWIN__
# ifndef __CYGWIN32__
# define __CYGWIN32__
# endif
#endif #endif
extern const char hamlib_version[]; /* __BEGIN_DECLS should be used at the beginning of your declarations,
* so that C++ compilers don't mangle their names. Use __END_DECLS at
* the end of C declarations. */
#undef __BEGIN_DECLS
#undef __END_DECLS
#ifdef __cplusplus
# define __BEGIN_DECLS extern "C" {
# define __END_DECLS }
#else
# define __BEGIN_DECLS /* empty */
# define __END_DECLS /* empty */
#endif
/* RIG_PARAMS is a macro used to wrap function prototypes, so that compilers
* that don't understand ANSI C prototypes still work, and ANSI C
* compilers can issue warnings about type mismatches. */
#undef RIG_PARAMS
#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(__CYGWIN32__) || defined(__cplusplus)
# define RIG_PARAMS(protos) protos
# define rig_ptr_t void*
#else
# define RIG_PARAMS(protos) ()
# define rig_ptr_t char*
#endif
#ifdef __CYGWIN32__
# ifdef HAMLIB_DLL
/* need some (as yet non-existant) automake magic to tell
* the object whether the libhamlib it will be linked with is
* a dll or not, ie whether LIBHAMLIB_DLL is defined or not.
*/
# ifdef _LIBHAMLIB_COMPILATION_
# define EXTERN __declspec(dllexport)
# else
# define EXTERN extern __declspec(dllimport)
# endif
# else
# define EXTERN extern
# endif
#else
# define EXTERN extern
#endif
__BEGIN_DECLS
EXTERN const char hamlib_version[];
typedef unsigned int tone_t; typedef unsigned int tone_t;
extern const tone_t full_ctcss_list[]; EXTERN const tone_t full_ctcss_list[];
extern const tone_t common_ctcss_list[]; EXTERN const tone_t common_ctcss_list[];
extern const tone_t full_dcs_list[]; EXTERN const tone_t full_dcs_list[];
#define CTCSS_LIST_SIZE (sizeof(full_ctcss_list)/sizeof(tone_t)-1) #define CTCSS_LIST_SIZE (sizeof(full_ctcss_list)/sizeof(tone_t)-1)
#define DCS_LIST_SIZE (sizeof(full_dcs_list)/sizeof(tone_t)-1) #define DCS_LIST_SIZE (sizeof(full_dcs_list)/sizeof(tone_t)-1)
@ -689,7 +740,7 @@ struct rig_caps {
struct filter_list filters[FLTLSTSIZ]; /* mode/filter table, at -6dB */ struct filter_list filters[FLTLSTSIZ]; /* mode/filter table, at -6dB */
const void *priv; const rig_ptr_t priv;
/* /*
* Rig Admin API * Rig Admin API
@ -929,7 +980,7 @@ struct rig_state {
* Pointer to private data * Pointer to private data
* tuff like CI_V_address for Icom goes in this *priv 51 area * tuff like CI_V_address for Icom goes in this *priv 51 area
*/ */
void *priv; rig_ptr_t priv;
/* etc... */ /* etc... */
}; };
@ -968,155 +1019,153 @@ struct rig {
/* --------------- API function prototypes -----------------*/ /* --------------- API function prototypes -----------------*/
extern RIG *rig_init(rig_model_t rig_model); extern RIG *rig_init RIG_PARAMS((rig_model_t rig_model));
extern int rig_open(RIG *rig); extern int rig_open RIG_PARAMS((RIG *rig));
/* /*
* General API commands, from most primitive to least.. :() * General API commands, from most primitive to least.. :()
* List Set/Get functions pairs * List Set/Get functions pairs
*/ */
extern int rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq); /* select freq */ extern int rig_set_freq RIG_PARAMS((RIG *rig, vfo_t vfo, freq_t freq));
extern int rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq); /* get freq */ extern int rig_get_freq RIG_PARAMS((RIG *rig, vfo_t vfo, freq_t *freq));
extern int rig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width); /* select mode */ extern int rig_set_mode RIG_PARAMS((RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width));
extern int rig_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width); /* get mode */ extern int rig_get_mode RIG_PARAMS((RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width));
extern int rig_set_vfo(RIG *rig, vfo_t vfo); /* select vfo */ extern int rig_set_vfo RIG_PARAMS((RIG *rig, vfo_t vfo));
extern int rig_get_vfo(RIG *rig, vfo_t *vfo); /* get vfo */ extern int rig_get_vfo RIG_PARAMS((RIG *rig, vfo_t *vfo));
extern int rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt); /* ptt on/off */ extern int rig_set_ptt RIG_PARAMS((RIG *rig, vfo_t vfo, ptt_t ptt));
extern int rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt); /* get ptt status */ extern int rig_get_ptt RIG_PARAMS((RIG *rig, vfo_t vfo, ptt_t *ptt));
extern int rig_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd); /* get dcd status */ extern int rig_get_dcd RIG_PARAMS((RIG *rig, vfo_t vfo, dcd_t *dcd));
extern int rig_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift); /* set repeater shift */ extern int rig_set_rptr_shift RIG_PARAMS((RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift));
extern int rig_get_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift); /* get repeater shift */ extern int rig_get_rptr_shift RIG_PARAMS((RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift));
extern int rig_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t rptr_offs); /* set repeater offset */ extern int rig_set_rptr_offs RIG_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t rptr_offs));
extern int rig_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs); /* get repeater offset */ extern int rig_get_rptr_offs RIG_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs));
extern int rig_set_ctcss(RIG *rig, vfo_t vfo, tone_t tone); extern int rig_set_ctcss RIG_PARAMS((RIG *rig, vfo_t vfo, tone_t tone));
extern int rig_get_ctcss(RIG *rig, vfo_t vfo, tone_t *tone); extern int rig_get_ctcss RIG_PARAMS((RIG *rig, vfo_t vfo, tone_t *tone));
extern int rig_set_dcs(RIG *rig, vfo_t vfo, tone_t code); extern int rig_set_dcs RIG_PARAMS((RIG *rig, vfo_t vfo, tone_t code));
extern int rig_get_dcs(RIG *rig, vfo_t vfo, tone_t *code); extern int rig_get_dcs RIG_PARAMS((RIG *rig, vfo_t vfo, tone_t *code));
extern int rig_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone); extern int rig_set_ctcss_sql RIG_PARAMS((RIG *rig, vfo_t vfo, tone_t tone));
extern int rig_get_ctcss_sql(RIG *rig, vfo_t vfo, tone_t *tone); extern int rig_get_ctcss_sql RIG_PARAMS((RIG *rig, vfo_t vfo, tone_t *tone));
extern int rig_set_dcs_sql(RIG *rig, vfo_t vfo, tone_t code); extern int rig_set_dcs_sql RIG_PARAMS((RIG *rig, vfo_t vfo, tone_t code));
extern int rig_get_dcs_sql(RIG *rig, vfo_t vfo, tone_t *code); extern int rig_get_dcs_sql RIG_PARAMS((RIG *rig, vfo_t vfo, tone_t *code));
extern int rig_set_split_freq(RIG *rig, vfo_t vfo, freq_t rx_freq, freq_t tx_freq); extern int rig_set_split_freq RIG_PARAMS((RIG *rig, vfo_t vfo, freq_t rx_freq, freq_t tx_freq));
extern int rig_get_split_freq(RIG *rig, vfo_t vfo, freq_t *rx_freq, freq_t *tx_freq); extern int rig_get_split_freq RIG_PARAMS((RIG *rig, vfo_t vfo, freq_t *rx_freq, freq_t *tx_freq));
extern int rig_set_split_mode(RIG *rig, vfo_t vfo, rmode_t rx_mode, pbwidth_t rx_width, rmode_t tx_mode, pbwidth_t tx_width); extern int rig_set_split_mode RIG_PARAMS((RIG *rig, vfo_t vfo, rmode_t rx_mode, pbwidth_t rx_width, rmode_t tx_mode, pbwidth_t tx_width));
extern int rig_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *rx_mode, pbwidth_t *rx_width, rmode_t *tx_mode, pbwidth_t *tx_width); extern int rig_get_split_mode RIG_PARAMS((RIG *rig, vfo_t vfo, rmode_t *rx_mode, pbwidth_t *rx_width, rmode_t *tx_mode, pbwidth_t *tx_width));
extern int rig_set_split(RIG *rig, vfo_t vfo, split_t split); extern int rig_set_split RIG_PARAMS((RIG *rig, vfo_t vfo, split_t split));
extern int rig_get_split(RIG *rig, vfo_t vfo, split_t *split); extern int rig_get_split RIG_PARAMS((RIG *rig, vfo_t vfo, split_t *split));
extern int rig_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit); extern int rig_set_rit RIG_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t rit));
extern int rig_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit); extern int rig_get_rit RIG_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t *rit));
extern int rig_set_xit(RIG *rig, vfo_t vfo, shortfreq_t xit); extern int rig_set_xit RIG_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t xit));
extern int rig_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *xit); extern int rig_get_xit RIG_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t *xit));
extern int rig_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts); /* set tuning step */ extern int rig_set_ts RIG_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t ts));
extern int rig_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts); /* get tuning step */ extern int rig_get_ts RIG_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t *ts));
extern int rig_power2mW(RIG *rig, unsigned int *mwpower, float power, freq_t freq, rmode_t mode); extern int rig_power2mW RIG_PARAMS((RIG *rig, unsigned int *mwpower, float power, freq_t freq, rmode_t mode));
extern int rig_mW2power(RIG *rig, float *power, unsigned int mwpower, freq_t freq, rmode_t mode); extern int rig_mW2power RIG_PARAMS((RIG *rig, float *power, unsigned int mwpower, freq_t freq, rmode_t mode));
extern shortfreq_t rig_get_resolution(RIG *rig, rmode_t mode); extern shortfreq_t rig_get_resolution RIG_PARAMS((RIG *rig, rmode_t mode));
extern int rig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val); extern int rig_set_level RIG_PARAMS((RIG *rig, vfo_t vfo, setting_t level, value_t val));
extern int rig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); extern int rig_get_level RIG_PARAMS((RIG *rig, vfo_t vfo, setting_t level, value_t *val));
#define rig_get_strength(r,v,s) rig_get_level((r),(v),RIG_LEVEL_STRENGTH, (value_t*)(s)) #define rig_get_strength(r,v,s) rig_get_level((r),(v),RIG_LEVEL_STRENGTH, (value_t*)(s))
extern int rig_set_parm(RIG *rig, setting_t parm, value_t val); extern int rig_set_parm RIG_PARAMS((RIG *rig, setting_t parm, value_t val));
extern int rig_get_parm(RIG *rig, setting_t parm, value_t *val); extern int rig_get_parm RIG_PARAMS((RIG *rig, setting_t parm, value_t *val));
extern int rig_set_powerstat(RIG *rig, powerstat_t status); extern int rig_set_powerstat RIG_PARAMS((RIG *rig, powerstat_t status));
extern int rig_get_powerstat(RIG *rig, powerstat_t *status); extern int rig_get_powerstat RIG_PARAMS((RIG *rig, powerstat_t *status));
extern int rig_reset(RIG *rig, reset_t reset); /* dangerous! */ extern int rig_reset RIG_PARAMS((RIG *rig, reset_t reset)); /* dangerous! */
/* more to come -- FS */ /* more to come -- FS */
extern int rig_close(RIG *rig); extern int rig_close RIG_PARAMS((RIG *rig));
extern int rig_cleanup(RIG *rig); extern int rig_cleanup RIG_PARAMS((RIG *rig));
extern rig_model_t rig_probe(port_t *p); extern rig_model_t rig_probe RIG_PARAMS((port_t *p));
extern int rig_set_ant(RIG *rig, vfo_t vfo, ant_t ant); /* antenna */ extern int rig_set_ant RIG_PARAMS((RIG *rig, vfo_t vfo, ant_t ant)); /* antenna */
extern int rig_get_ant(RIG *rig, vfo_t vfo, ant_t *ant); extern int rig_get_ant RIG_PARAMS((RIG *rig, vfo_t vfo, ant_t *ant));
extern setting_t rig_has_get_level(RIG *rig, setting_t level); extern setting_t rig_has_get_level RIG_PARAMS((RIG *rig, setting_t level));
extern setting_t rig_has_set_level(RIG *rig, setting_t level); extern setting_t rig_has_set_level RIG_PARAMS((RIG *rig, setting_t level));
extern setting_t rig_has_get_parm(RIG *rig, setting_t parm); extern setting_t rig_has_get_parm RIG_PARAMS((RIG *rig, setting_t parm));
extern setting_t rig_has_set_parm(RIG *rig, setting_t parm); extern setting_t rig_has_set_parm RIG_PARAMS((RIG *rig, setting_t parm));
extern setting_t rig_has_get_func(RIG *rig, setting_t func); extern setting_t rig_has_get_func RIG_PARAMS((RIG *rig, setting_t func));
extern setting_t rig_has_set_func(RIG *rig, setting_t func); extern setting_t rig_has_set_func RIG_PARAMS((RIG *rig, setting_t func));
extern int rig_set_func(RIG *rig, vfo_t vfo, setting_t func, int status); /* activate the function(s) */ extern int rig_set_func RIG_PARAMS((RIG *rig, vfo_t vfo, setting_t func, int status));
extern int rig_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status); /* get the setting from rig */ extern int rig_get_func RIG_PARAMS((RIG *rig, vfo_t vfo, setting_t func, int *status));
extern int rig_send_dtmf(RIG *rig, vfo_t vfo, const char *digits); extern int rig_send_dtmf RIG_PARAMS((RIG *rig, vfo_t vfo, const char *digits));
extern int rig_recv_dtmf(RIG *rig, vfo_t vfo, char *digits, int *length); extern int rig_recv_dtmf RIG_PARAMS((RIG *rig, vfo_t vfo, char *digits, int *length));
extern int rig_send_morse(RIG *rig, vfo_t vfo, const char *msg); extern int rig_send_morse RIG_PARAMS((RIG *rig, vfo_t vfo, const char *msg));
extern int rig_set_bank(RIG *rig, vfo_t vfo, int bank); /* set memory bank number */ extern int rig_set_bank RIG_PARAMS((RIG *rig, vfo_t vfo, int bank));
extern int rig_set_mem(RIG *rig, vfo_t vfo, int ch); /* set memory channel number */ extern int rig_set_mem RIG_PARAMS((RIG *rig, vfo_t vfo, int ch));
extern int rig_get_mem(RIG *rig, vfo_t vfo, int *ch); /* get memory channel number */ extern int rig_get_mem RIG_PARAMS((RIG *rig, vfo_t vfo, int *ch));
#ifdef WANT_OLD_VFO_TO_BE_REMOVED #ifdef WANT_OLD_VFO_TO_BE_REMOVED
extern int rig_mv_ctl(RIG *rig, vfo_t vfo, mv_op_t op); /* Mem/VFO operation */ extern int rig_mv_ctl RIG_PARAMS((RIG *rig, vfo_t vfo, mv_op_t op));
#else #else
extern int rig_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op); /* Mem/VFO operation */ extern int rig_vfo_op RIG_PARAMS((RIG *rig, vfo_t vfo, vfo_op_t op));
extern vfo_op_t rig_has_vfo_op(RIG *rig, vfo_op_t op); extern vfo_op_t rig_has_vfo_op RIG_PARAMS((RIG *rig, vfo_op_t op));
#endif #endif
extern int rig_restore_channel(RIG *rig, const channel_t *chan); /* curr VFO */ extern int rig_restore_channel RIG_PARAMS((RIG *rig, const channel_t *chan)); /* curr VFO */
extern int rig_save_channel(RIG *rig, channel_t *chan); extern int rig_save_channel RIG_PARAMS((RIG *rig, channel_t *chan));
extern int rig_set_channel(RIG *rig, const channel_t *chan); /* mem */ extern int rig_set_channel RIG_PARAMS((RIG *rig, const channel_t *chan)); /* mem */
extern int rig_get_channel(RIG *rig, channel_t *chan); extern int rig_get_channel RIG_PARAMS((RIG *rig, channel_t *chan));
extern int rig_set_trn(RIG *rig, vfo_t vfo, int trn); /* activate the transceive mode */ extern int rig_set_trn RIG_PARAMS((RIG *rig, vfo_t vfo, int trn));
extern int rig_get_trn(RIG *rig, vfo_t vfo, int *trn); extern int rig_get_trn RIG_PARAMS((RIG *rig, vfo_t vfo, int *trn));
extern const char *rig_get_info(RIG *rig); extern const char *rig_get_info RIG_PARAMS((RIG *rig));
extern const struct rig_caps *rig_get_caps(rig_model_t rig_model); extern const struct rig_caps *rig_get_caps RIG_PARAMS((rig_model_t rig_model));
const freq_range_t *rig_get_range(const freq_range_t range_list[], freq_t freq, rmode_t mode); const freq_range_t *rig_get_range RIG_PARAMS((const freq_range_t range_list[], freq_t freq, rmode_t mode));
extern pbwidth_t rig_passband_normal(RIG *rig, rmode_t mode); extern pbwidth_t rig_passband_normal RIG_PARAMS((RIG *rig, rmode_t mode));
extern pbwidth_t rig_passband_narrow(RIG *rig, rmode_t mode); extern pbwidth_t rig_passband_narrow RIG_PARAMS((RIG *rig, rmode_t mode));
extern pbwidth_t rig_passband_wide(RIG *rig, rmode_t mode); extern pbwidth_t rig_passband_wide RIG_PARAMS((RIG *rig, rmode_t mode));
extern const char *rigerror(int errnum); extern const char *rigerror RIG_PARAMS((int errnum));
extern int rig_setting2idx(setting_t s); extern int rig_setting2idx RIG_PARAMS((setting_t s));
#define rig_idx2setting(i) (1<<(i)) #define rig_idx2setting(i) (1<<(i))
/* /*
* Even if these functions are prefixed with "rig_", they are not rig specific * Even if these functions are prefixed with "rig_", they are not rig specific
* Maybe "hamlib_" would have been better. Let me know. --SF * Maybe "hamlib_" would have been better. Let me know. --SF
*/ */
void rig_set_debug(enum rig_debug_level_e debug_level); void rig_set_debug RIG_PARAMS((enum rig_debug_level_e debug_level));
int rig_need_debug(enum rig_debug_level_e debug_level); int rig_need_debug RIG_PARAMS((enum rig_debug_level_e debug_level));
void rig_debug(enum rig_debug_level_e debug_level, const char *fmt, ...); void rig_debug RIG_PARAMS((enum rig_debug_level_e debug_level, const char *fmt, ...));
int rig_register(const struct rig_caps *caps); int rig_register RIG_PARAMS((const struct rig_caps *caps));
int rig_unregister(rig_model_t rig_model); int rig_unregister RIG_PARAMS((rig_model_t rig_model));
int rig_list_foreach(int (*cfunc)(const struct rig_caps*,void*),void *data); int rig_list_foreach RIG_PARAMS((int (*cfunc)(const struct rig_caps*, rig_ptr_t), rig_ptr_t data));
int rig_load_backend(const char *be_name); int rig_load_backend RIG_PARAMS((const char *be_name));
int rig_check_backend(rig_model_t rig_model); int rig_check_backend RIG_PARAMS((rig_model_t rig_model));
int rig_load_all_backends(); int rig_load_all_backends RIG_PARAMS(());
rig_model_t rig_probe_all(port_t *p); rig_model_t rig_probe_all RIG_PARAMS((port_t *p));
#ifdef __cplusplus __END_DECLS
}
#endif
#endif /* _RIG_H */ #endif /* _RIG_H */

Wyświetl plik

@ -1,6 +1,12 @@
TSSRCLIST = ts870s.c
lib_LTLIBRARIES = libhamlib-kenwood.la lib_LTLIBRARIES = libhamlib-kenwood.la
libhamlib_kenwood_la_SOURCES = ts870s.c kenwood.c libhamlib_kenwood_la_SOURCES = $(TSSRCLIST) kenwood.c
libhamlib_kenwood_la_LDFLAGS = -avoid-version # -module libhamlib_kenwood_la_LDFLAGS = -module -avoid-version
libhamlib_kenwood_la_LIBADD = ../src/libhamlib.la
lib_LIBRARIES = libhamlib-kenwood.a lib_LIBRARIES = libhamlib-kenwood.a
libhamlib_kenwood_a_SOURCES = ts870s.c kenwood.c libhamlib_kenwood_a_SOURCES = $(TSSRCLIST) kenwood.c
libhamlib_kenwood_a_LIBADD = ../src/libhamlib.la
noinst_HEADERS = kenwood.h noinst_HEADERS = kenwood.h

Wyświetl plik

@ -1,6 +1,12 @@
PCRSRCLIST = pcr1000.c pcr100.c
lib_LTLIBRARIES = libhamlib-pcr.la lib_LTLIBRARIES = libhamlib-pcr.la
libhamlib_pcr_la_SOURCES = pcr.c pcr1000.c pcr100.c libhamlib_pcr_la_SOURCES = $(PCRSRCLIST) pcr.c
libhamlib_pcr_la_LDFLAGS = -avoid-version # -module libhamlib_pcr_la_LDFLAGS = -module -avoid-version
libhamlib_pcr_la_LIBADD = ../src/libhamlib.la
lib_LIBRARIES = libhamlib-pcr.a lib_LIBRARIES = libhamlib-pcr.a
libhamlib_pcr_a_SOURCES = pcr.c pcr1000.c pcr100.c libhamlib_pcr_a_SOURCES = $(PCRSRCLIST) pcr.c
libhamlib_pcr_a_LIBADD = ../src/libhamlib.la
noinst_HEADERS = pcr.h noinst_HEADERS = pcr.h

Wyświetl plik

@ -2,7 +2,7 @@ INCLUDES = $(INCLTDL)
lib_LTLIBRARIES = libhamlib.la lib_LTLIBRARIES = libhamlib.la
libhamlib_la_SOURCES = rig.c serial.c misc.c register.c event.c cal.c libhamlib_la_SOURCES = rig.c serial.c misc.c register.c event.c cal.c
libhamlib_la_LDFLAGS = -release @VERSION@ libhamlib_la_LDFLAGS = -no-undefined -release @VERSION@
libhamlib_la_LIBADD = $(LIBLTDL) libhamlib_la_LIBADD = $(LIBLTDL)
libhamlib_la_DEPENDENCIES = $(LIBLTDL) libhamlib_la_DEPENDENCIES = $(LIBLTDL)

Wyświetl plik

@ -2,7 +2,7 @@
Copyright (C) 2000,2001 Stephane Fillod and Frank Singleton Copyright (C) 2000,2001 Stephane Fillod and Frank Singleton
This file is part of the hamlib package. This file is part of the hamlib package.
$Id: event.c,v 1.5 2001-06-04 17:01:21 f4cfe Exp $ $Id: event.c,v 1.6 2001-06-11 00:41:28 f4cfe Exp $
Hamlib is free software; you can redistribute it and/or modify it Hamlib is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by under the terms of the GNU General Public License as published by
@ -47,7 +47,7 @@ static void sa_sigioaction(int signum, siginfo_t *si, void *data);
#endif #endif
/* This one should be in an include file */ /* This one should be in an include file */
int foreach_opened_rig(int (*cfunc)(RIG *, void *),void *data); int foreach_opened_rig(int (*cfunc)(RIG *, rig_ptr_t),rig_ptr_t data);
/* /*
* add_trn_rig * add_trn_rig
@ -118,7 +118,7 @@ int remove_trn_rig(RIG *rig)
* *
* assumes rig!=NULL, rig->state.rigport.fd>=0 * assumes rig!=NULL, rig->state.rigport.fd>=0
*/ */
static int search_rig_and_decode(RIG *rig, void *data) static int search_rig_and_decode(RIG *rig, rig_ptr_t data)
{ {
fd_set rfds; fd_set rfds;
struct timeval tv; struct timeval tv;
@ -176,7 +176,7 @@ static void sa_sigiohandler(int signum)
} }
#else #else
static void sa_sigioaction(int signum, siginfo_t *si, void *data) static void sa_sigioaction(int signum, siginfo_t *si, rig_ptr_t data)
{ {
rig_debug(RIG_DEBUG_VERBOSE, "sa_sigioaction: activity detected\n"); rig_debug(RIG_DEBUG_VERBOSE, "sa_sigioaction: activity detected\n");

Wyświetl plik

@ -2,7 +2,7 @@
register.c - Copyright (C) 2000 Stephane Fillod and Frank Singleton register.c - Copyright (C) 2000 Stephane Fillod and Frank Singleton
Provides registering for dynamically loadable backends. Provides registering for dynamically loadable backends.
$Id: register.c,v 1.5 2001-06-04 21:17:52 f4cfe Exp $ $Id: register.c,v 1.6 2001-06-11 00:41:28 f4cfe Exp $
Hamlib is free software; you can redistribute it and/or modify it Hamlib is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by under the terms of the GNU General Public License as published by
@ -205,7 +205,7 @@ int rig_unregister(rig_model_t rig_model)
* rig_list_foreach * rig_list_foreach
* executes cfunc on all the elements stored in the rig hash list * executes cfunc on all the elements stored in the rig hash list
*/ */
int rig_list_foreach(int (*cfunc)(const struct rig_caps*, void *),void *data) int rig_list_foreach(int (*cfunc)(const struct rig_caps*, rig_ptr_t),rig_ptr_t data)
{ {
struct rig_list *p; struct rig_list *p;
int i; int i;
@ -262,7 +262,7 @@ int rig_load_backend(const char *be_name)
# define PREFIX "libhamlib-" # define PREFIX "libhamlib-"
# define POSTFIX ".so" /* ".so.%u" */ # define POSTFIX ".so" /* ".so.%u" */
lt_dlhandle be_handle; lt_dlhandle be_handle;
int (*be_init)(void *); int (*be_init)(rig_ptr_t);
int status; int status;
char libname[PATH_MAX]; char libname[PATH_MAX];
char initfname[MAXFUNCNAMELEN] = "init_"; char initfname[MAXFUNCNAMELEN] = "init_";
@ -272,6 +272,9 @@ int rig_load_backend(const char *be_name)
/* /*
* lt_dlinit may be called several times * lt_dlinit may be called several times
*/ */
#if 0
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 "
@ -296,7 +299,7 @@ int rig_load_backend(const char *be_name)
strncat(initfname, be_name, MAXFUNCNAMELEN); strncat(initfname, be_name, MAXFUNCNAMELEN);
be_init = (int (*)(void *)) lt_dlsym (be_handle, initfname); be_init = (int (*)(rig_ptr_t)) lt_dlsym (be_handle, initfname);
if (!be_init) { if (!be_init) {
rig_debug(RIG_DEBUG_ERR, "rig: dlsym(%s) failed (%s)\n", rig_debug(RIG_DEBUG_ERR, "rig: dlsym(%s) failed (%s)\n",
initfname, lt_dlerror()); initfname, lt_dlerror());

Wyświetl plik

@ -2,7 +2,7 @@
Copyright (C) 2000,2001 Stephane Fillod and Frank Singleton Copyright (C) 2000,2001 Stephane Fillod and Frank Singleton
This file is part of the hamlib package. This file is part of the hamlib package.
$Id: rig.c,v 1.34 2001-06-10 22:19:07 f4cfe Exp $ $Id: rig.c,v 1.35 2001-06-11 00:41:28 f4cfe Exp $
Hamlib is free software; you can redistribute it and/or modify it Hamlib is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by under the terms of the GNU General Public License as published by
@ -196,7 +196,7 @@ static int remove_opened_rig(RIG *rig)
* %RIG_OK. * %RIG_OK.
*/ */
int foreach_opened_rig(int (*cfunc)(RIG *, void *),void *data) int foreach_opened_rig(int (*cfunc)(RIG *, rig_ptr_t), rig_ptr_t data)
{ {
struct opened_rig_l *p; struct opened_rig_l *p;
@ -3440,7 +3440,7 @@ int rig_save_channel(RIG *rig, channel_t *chan)
int chan_num; int chan_num;
chan_num = chan->channel_num; chan_num = chan->channel_num;
memset((void*)chan, 0, sizeof(channel_t)); memset(chan, 0, sizeof(channel_t));
chan->channel_num = chan_num; chan->channel_num = chan_num;
rig_get_vfo(rig, &chan->vfo); rig_get_vfo(rig, &chan->vfo);

Wyświetl plik

@ -6,7 +6,8 @@ EXTRA_PROGRAMS = rigmatrix
LDADD = ../src/libhamlib.la LDADD = ../src/libhamlib.la
DEPENDENCIES = ../src/libhamlib.la DEPENDENCIES = ../src/libhamlib.la
BACKENDLNK = "-dlopen" ../icom/libhamlib-icom.la "-dlopen" ../yaesu/libhamlib-yaesu.la "-dlopen" ../kenwood/libhamlib-kenwood.la "-dlopen" ../aor/libhamlib-aor.la "-dlopen" ../dummy/libhamlib-dummy.la "-dlopen" ../pcr/libhamlib-pcr.la "-dlopen" ../alinco/libhamlib-alinco.la @WINRADIOLNK@ ## The quotes around -dlopen below fool automake into accepting it
BACKENDLNK = "-dlopen" self "-dlopen" ../icom/libhamlib-icom.la "-dlopen" ../yaesu/libhamlib-yaesu.la "-dlopen" ../kenwood/libhamlib-kenwood.la "-dlopen" ../aor/libhamlib-aor.la "-dlopen" ../dummy/libhamlib-dummy.la "-dlopen" ../pcr/libhamlib-pcr.la "-dlopen" ../alinco/libhamlib-alinco.la @WINRADIOLNK@
BACKENDEPS = ../icom/libhamlib-icom.la ../yaesu/libhamlib-yaesu.la ../kenwood/libhamlib-kenwood.la ../aor/libhamlib-aor.la ../dummy/libhamlib-dummy.la ../pcr/libhamlib-pcr.la ../alinco/libhamlib-alinco.la @WINRADIODEPS@ BACKENDEPS = ../icom/libhamlib-icom.la ../yaesu/libhamlib-yaesu.la ../kenwood/libhamlib-kenwood.la ../aor/libhamlib-aor.la ../dummy/libhamlib-dummy.la ../pcr/libhamlib-pcr.la ../alinco/libhamlib-alinco.la @WINRADIODEPS@
## Linker options ## Linker options
@ -43,11 +44,10 @@ listrigs_SOURCES = listrigs.c
rigctl_SOURCES = rigctl.c rigctl_SOURCES = rigctl.c
rigmatrix_SOURCES = rigmatrix.c rigmatrix_SOURCES = rigmatrix.c
rigmatrix.html: rigmatrix_head.html rigmatrix rigmatrix.html: rigmatrix_head.html rigmatrix listrigs dumpcaps
mkdir -p html mkdir -p html
cd html ( cd html && cat ../rigmatrix_head.html && ../rigmatrix ) > html/rigmatrix.html
mv rigmatrix.html rigmatrix-old.html #for f in `./listrigs | tail +2 | cut -f1` ; do ./dumpcaps $f > html/model$1.txt ; done
( cat ../rigmatrix_head.html && ../rigmatrix ) > rigmatrix.html # ./listrigs | awk 'NR!=1 { system("./dumpcaps $1 > html/model$1.txt") }'
cd ..
noinst_DATA = rigmatrix_head.html noinst_DATA = rigmatrix_head.html

Wyświetl plik

@ -1,15 +1,17 @@
WRSRCLIST = wr1000.c wr1500.c wr1550.c wr3100.c wr3150.c wr3500.c wr3700.c WRSRCLIST = wr1000.c wr1500.c wr1550.c wr3100.c wr3150.c wr3500.c wr3700.c
LDFLAGS = -avoid-version # -module LDFLAGS = -module -avoid-version
if WINRADIO if WINRADIO
#lib_LTLIBRARIES = @LTLIBWINRADIO@ #lib_LTLIBRARIES = @LTLIBWINRADIO@
lib_LTLIBRARIES = libhamlib-winradio.la lib_LTLIBRARIES = libhamlib-winradio.la
libhamlib_winradio_la_SOURCES = winradio.c $(WRSRCLIST) libhamlib_winradio_la_SOURCES = winradio.c $(WRSRCLIST)
libhamlib_winradio_la_LIBADD = ../src/libhamlib.la
#EXTRA_LTLIBRARIES = libhamlib-winradio.la #EXTRA_LTLIBRARIES = libhamlib-winradio.la
endif endif
lib_LIBRARIES = @LIBWINRADIO@ lib_LIBRARIES = @LIBWINRADIO@
libhamlib_winradio_a_SOURCES = winradio.c $(WRSRCLIST) libhamlib_winradio_a_SOURCES = winradio.c $(WRSRCLIST)
libhamlib_winradio_a_LIBADD = ../src/libhamlib.la
EXTRA_LIBRARIES = libhamlib-winradio.a EXTRA_LIBRARIES = libhamlib-winradio.a
noinst_HEADERS = winradio.h noinst_HEADERS = winradio.h

Wyświetl plik

@ -2,7 +2,7 @@ YAESUSRC = ft747.c ft847.c
lib_LTLIBRARIES = libhamlib-yaesu.la lib_LTLIBRARIES = libhamlib-yaesu.la
libhamlib_yaesu_la_SOURCES = yaesu.c $(YAESUSRC) libhamlib_yaesu_la_SOURCES = yaesu.c $(YAESUSRC)
libhamlib_yaesu_la_LDFLAGS = -avoid-version # -module libhamlib_yaesu_la_LDFLAGS = -module -avoid-version
libhamlib_yaesu_la_LIBADD = ../src/libhamlib.la libhamlib_yaesu_la_LIBADD = ../src/libhamlib.la
lib_LIBRARIES = libhamlib-yaesu.a lib_LIBRARIES = libhamlib-yaesu.a