diff --git a/src/cal.c b/src/cal.c index 1d21a11f2..e387c032e 100644 --- a/src/cal.c +++ b/src/cal.c @@ -3,21 +3,20 @@ * Copyright (c) 2000-2009 by Stephane Fillod * Copyright (c) 2000-2003 by Frank Singleton * - * $Id: cal.c,v 1.7 2007-11-05 03:48:14 aa6e 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 - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ @@ -48,9 +47,9 @@ * cal_table_t is a data type suited to hold linear calibration * cal_table_t.size tell the number of plot cal_table_t.table contains - * If a value is below or equal to cal_table_t.table[0].raw, + * If a value is below or equal to cal_table_t.table[0].raw, * rig_raw2val() will return cal_table_t.table[0].val - * If a value is greater or equal to cal_table_t.table[cal_table_t.size-1].raw, + * If a value is greater or equal to cal_table_t.table[cal_table_t.size-1].raw, * rig_raw2val() will return cal_table_t.table[cal_table_t.size-1].val */ @@ -84,13 +83,13 @@ float HAMLIB_API rig_raw2val(int rawval, const cal_table_t *cal) #ifdef WANT_CHEAP_WNO_FP /* cheap, less accurate, but no fp needed */ - interpolation = ((cal->table[i].raw - rawval) * + interpolation = ((cal->table[i].raw - rawval) * (cal->table[i].val - cal->table[i-1].val)) / (cal->table[i].raw - cal->table[i-1].raw); return cal->table[i].val - interpolation; #else - interpolation = ((cal->table[i].raw - rawval) * + interpolation = ((cal->table[i].raw - rawval) * (float)(cal->table[i].val - cal->table[i-1].val)) / (float)(cal->table[i].raw - cal->table[i-1].raw); #endif diff --git a/src/cal.h b/src/cal.h index f4fbe77df..730c20a33 100644 --- a/src/cal.h +++ b/src/cal.h @@ -2,21 +2,20 @@ * Hamlib Interface - calibration header * Copyright (c) 2000,2001 by Stephane Fillod and Frank Singleton * - * $Id: cal.h,v 1.5 2003-11-16 17:14:44 fillods 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 - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ diff --git a/src/conf.c b/src/conf.c index 7619ba560..bdf868912 100644 --- a/src/conf.c +++ b/src/conf.c @@ -14,19 +14,19 @@ * Copyright (c) 2000-2010 by Stephane Fillod * * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ @@ -47,15 +47,15 @@ * Configuration options available in the rig->state struct. */ static const struct confparams frontend_cfg_params[] = { - { TOK_PATHNAME, "rig_pathname", "Rig path name", + { TOK_PATHNAME, "rig_pathname", "Rig path name", "Path name to the device file of the rig", - "/dev/rig", RIG_CONF_STRING, + "/dev/rig", RIG_CONF_STRING, }, - { TOK_WRITE_DELAY, "write_delay", "Write delay", + { TOK_WRITE_DELAY, "write_delay", "Write delay", "Delay in ms between each byte sent out", "0", RIG_CONF_NUMERIC, { .n = { 0, 1000, 1 } } }, - { TOK_POST_WRITE_DELAY, "post_write_delay", "Post write delay", + { TOK_POST_WRITE_DELAY, "post_write_delay", "Post write delay", "Delay in ms between each command sent out", "0", RIG_CONF_NUMERIC, { .n = { 0, 1000, 1 } } }, @@ -65,34 +65,34 @@ static const struct confparams frontend_cfg_params[] = { { TOK_RETRY, "retry", "Retry", "Max number of retry", "0", RIG_CONF_NUMERIC, { .n = { 0, 10, 1 } } }, - { TOK_ITU_REGION, "itu_region", "ITU region", + { TOK_ITU_REGION, "itu_region", "ITU region", "ITU region this rig has been manufactured for (freq. band plan)", "0", RIG_CONF_NUMERIC, { .n = { 1, 3, 1 } } }, - { TOK_VFO_COMP, "vfo_comp", "VFO compensation", + { TOK_VFO_COMP, "vfo_comp", "VFO compensation", "VFO compensation in ppm", "0", RIG_CONF_NUMERIC, { .n = { 0.0, 1000.0, .001 } } }, - { TOK_POLL_INTERVAL, "poll_interval", "Polling interval", + { TOK_POLL_INTERVAL, "poll_interval", "Polling interval", "Polling interval in millisecond for transceive emulation", "500", RIG_CONF_NUMERIC, { .n = { 0, 1000000, 1 } } }, - { TOK_PTT_TYPE, "ptt_type", "PTT type", + { TOK_PTT_TYPE, "ptt_type", "PTT type", "Push-To-Talk interface type override", "RIG", RIG_CONF_COMBO, { .c = {{ "RIG", "DTR", "RTS", "Parallel", "None", NULL }} } }, - { TOK_PTT_PATHNAME, "ptt_pathname", "PTT path name", + { TOK_PTT_PATHNAME, "ptt_pathname", "PTT path name", "Path name to the device file of the Push-To-Talk", - "/dev/rig", RIG_CONF_STRING, + "/dev/rig", RIG_CONF_STRING, }, - { TOK_DCD_TYPE, "dcd_type", "DCD type", + { TOK_DCD_TYPE, "dcd_type", "DCD type", "Data Carrier Detect (or squelch) interface type override", "RIG", RIG_CONF_COMBO, { .c = {{ "RIG", "DSR", "CTS", "CD", "Parallel", "None", NULL }} } }, - { TOK_DCD_PATHNAME, "dcd_pathname", "DCD path name", + { TOK_DCD_PATHNAME, "dcd_pathname", "DCD path name", "Path name to the device file of the Data Carrier Detect (or squelch)", - "/dev/rig", RIG_CONF_STRING, + "/dev/rig", RIG_CONF_STRING, }, { RIG_CONF_END, NULL, } @@ -100,32 +100,32 @@ static const struct confparams frontend_cfg_params[] = { static const struct confparams frontend_serial_cfg_params[] = { - { TOK_SERIAL_SPEED, "serial_speed", "Serial speed", + { TOK_SERIAL_SPEED, "serial_speed", "Serial speed", "Serial port baud rate", "0", RIG_CONF_NUMERIC, { .n = { 300, 115200, 1 } } }, - { TOK_DATA_BITS, "data_bits", "Serial data bits", + { TOK_DATA_BITS, "data_bits", "Serial data bits", "Serial port data bits", "8", RIG_CONF_NUMERIC, { .n = { 5, 8, 1 } } }, - { TOK_STOP_BITS, "stop_bits", "Serial stop bits", + { TOK_STOP_BITS, "stop_bits", "Serial stop bits", "Serial port stop bits", "1", RIG_CONF_NUMERIC, { .n = { 0, 3, 1 } } }, - { TOK_PARITY, "serial_parity", "Serial parity", + { TOK_PARITY, "serial_parity", "Serial parity", "Serial port parity", "None", RIG_CONF_COMBO, { .c = {{ "None", "Odd", "Even", "Mark", "Space", NULL }} } }, - { TOK_HANDSHAKE, "serial_handshake", "Serial handshake", + { TOK_HANDSHAKE, "serial_handshake", "Serial handshake", "Serial port handshake", "None", RIG_CONF_COMBO, { .c = {{ "None", "XONXOFF", "Hardware", NULL }} } }, - { TOK_RTS_STATE, "rts_state", "RTS state", + { TOK_RTS_STATE, "rts_state", "RTS state", "Serial port set state of RTS signal for external powering", "Unset", RIG_CONF_COMBO, { .c = {{ "Unset", "ON", "OFF", NULL }} } }, - { TOK_DTR_STATE, "dtr_state", "DTR state", + { TOK_DTR_STATE, "dtr_state", "DTR state", "Serial port set state of DTR signal for external powering", "Unset", RIG_CONF_COMBO, { .c = {{ "Unset", "ON", "OFF", NULL }} } }, @@ -142,10 +142,10 @@ static int frontend_set_conf(RIG *rig, token_t token, const char *val) const struct rig_caps *caps; struct rig_state *rs; int val_i; - + caps = rig->caps; rs = &rig->state; - + switch(token) { case TOK_PATHNAME: strncpy(rs->rigport.pathname, val, FILPATHLEN-1); @@ -174,7 +174,7 @@ static int frontend_set_conf(RIG *rig, token_t token, const char *val) } rs->rigport.retry = val_i; break; - + case TOK_SERIAL_SPEED: if (rs->rigport.type.rig != RIG_PORT_SERIAL) return -RIG_EINVAL; @@ -212,7 +212,7 @@ static int frontend_set_conf(RIG *rig, token_t token, const char *val) rs->rigport.parm.serial.parity = RIG_PARITY_MARK; else if (!strcmp(val, "Space")) rs->rigport.parm.serial.parity = RIG_PARITY_SPACE; - else + else return -RIG_EINVAL; break; case TOK_HANDSHAKE: @@ -224,10 +224,10 @@ static int frontend_set_conf(RIG *rig, token_t token, const char *val) rs->rigport.parm.serial.handshake = RIG_HANDSHAKE_XONXOFF; else if (!strcmp(val, "Hardware")) rs->rigport.parm.serial.handshake = RIG_HANDSHAKE_HARDWARE; - else + else return -RIG_EINVAL; break; - + case TOK_RTS_STATE: if (rs->rigport.type.rig != RIG_PORT_SERIAL) return -RIG_EINVAL; @@ -237,10 +237,10 @@ static int frontend_set_conf(RIG *rig, token_t token, const char *val) rs->rigport.parm.serial.rts_state = RIG_SIGNAL_ON; else if (!strcmp(val, "OFF")) rs->rigport.parm.serial.rts_state = RIG_SIGNAL_OFF; - else + else return -RIG_EINVAL; break; - + case TOK_DTR_STATE: if (rs->rigport.type.rig != RIG_PORT_SERIAL) return -RIG_EINVAL; @@ -250,10 +250,10 @@ static int frontend_set_conf(RIG *rig, token_t token, const char *val) rs->rigport.parm.serial.dtr_state = RIG_SIGNAL_ON; else if (!strcmp(val, "OFF")) rs->rigport.parm.serial.dtr_state = RIG_SIGNAL_OFF; - else + else return -RIG_EINVAL; break; - + case TOK_ITU_REGION: if (1 != sscanf(val, "%d", &val_i)){ return -RIG_EINVAL;//value format error @@ -292,14 +292,14 @@ static int frontend_set_conf(RIG *rig, token_t token, const char *val) rs->pttport.type.ptt = RIG_PTT_PARALLEL; else if (!strcmp(val, "None")) rs->pttport.type.ptt = RIG_PTT_NONE; - else + else return -RIG_EINVAL; break; case TOK_PTT_PATHNAME: strncpy(rs->pttport.pathname, val, FILPATHLEN-1); break; - + case TOK_DCD_TYPE: if (!strcmp(val, "RIG")) rs->dcdport.type.dcd = RIG_DCD_RIG; @@ -313,14 +313,14 @@ static int frontend_set_conf(RIG *rig, token_t token, const char *val) rs->dcdport.type.dcd = RIG_DCD_PARALLEL; else if (!strcmp(val, "None")) rs->dcdport.type.dcd = RIG_DCD_NONE; - else + else return -RIG_EINVAL; break; case TOK_DCD_PATHNAME: strncpy(rs->dcdport.pathname, val, FILPATHLEN-1); break; - + case TOK_VFO_COMP: rs->vfo_comp = atof(val); @@ -328,8 +328,8 @@ static int frontend_set_conf(RIG *rig, token_t token, const char *val) case TOK_POLL_INTERVAL: rs->poll_interval = atof(val); break; - - + + default: return -RIG_EINVAL; } @@ -366,7 +366,7 @@ static int frontend_get_conf(RIG *rig, token_t token, char *val) sprintf(val, "%d", rs->rigport.retry); break; case TOK_ITU_REGION: - sprintf(val, "%d", + sprintf(val, "%d", rs->itu_region == 1 ? RIG_ITU_REGION1 : RIG_ITU_REGION2); break; case TOK_SERIAL_SPEED: @@ -454,11 +454,11 @@ static int frontend_get_conf(RIG *rig, token_t token, char *val) * \param data Any data to be passed to cfunc * * Executes \a cfunc on all the elements stored in the conf table. - * rig_token_foreach starts first with backend conf table, then finish + * rig_token_foreach starts first with backend conf table, then finish * with frontend table. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). */ int HAMLIB_API rig_token_foreach(RIG *rig, int (*cfunc)(const struct confparams *, rig_ptr_t), rig_ptr_t data) @@ -549,10 +549,10 @@ token_t HAMLIB_API rig_token_lookup(RIG *rig, const char *name) * \param token The parameter * \param val The value to set the parameter to * - * Sets a configuration parameter. + * Sets a configuration parameter. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_get_conf() @@ -590,8 +590,8 @@ int HAMLIB_API rig_set_conf(RIG *rig, token_t token, const char *val) * Retrieves the value of a configuration paramter associated with \a token. * The location pointed to by val must be large enough to hold the value of the config. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_set_conf() diff --git a/src/debug.c b/src/debug.c index a45971d9a..85c5e9f2b 100644 --- a/src/debug.c +++ b/src/debug.c @@ -3,19 +3,20 @@ * Copyright (c) 2000-2010 by Stephane Fillod * * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * */ /** diff --git a/src/event.c b/src/event.c index 798df6790..d6a9b8008 100644 --- a/src/event.c +++ b/src/event.c @@ -4,19 +4,19 @@ * Copyright (c) 2000-2003 by Frank Singleton * * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ @@ -253,7 +253,7 @@ static int search_rig_and_decode(RIG *rig, rig_ptr_t data) /* * so far, only file oriented ports have event reporting support */ - if (rig->state.rigport.type.rig != RIG_PORT_SERIAL || + if (rig->state.rigport.type.rig != RIG_PORT_SERIAL || rig->state.rigport.fd == -1) return -1; @@ -269,12 +269,12 @@ static int search_rig_and_decode(RIG *rig, rig_ptr_t data) /* Read status immediately. */ tv.tv_sec = 0; tv.tv_usec = 0; - + /* don't use FIONREAD to detect activity * since it is less portable than select * REM: EINTR possible with 0sec timeout? retval==0? */ - retval = select(rig->state.rigport.fd+1, &rfds, NULL, NULL, &tv); + retval = select(rig->state.rigport.fd+1, &rfds, NULL, NULL, &tv); if (retval < 0) { rig_debug(RIG_DEBUG_ERR, "search_rig_and_decode: select: %s\n", strerror(errno)); @@ -345,7 +345,7 @@ static int search_rig_and_poll(RIG *rig, rig_ptr_t data) retval = rig->caps->get_mode(rig, RIG_VFO_CURR, &rmode, &width); if (retval == RIG_OK) { if (rmode != rs->current_mode || width != rs->current_width) { - rig->callbacks.mode_event(rig, RIG_VFO_CURR, + rig->callbacks.mode_event(rig, RIG_VFO_CURR, rmode, width, rig->callbacks.mode_arg); } rs->current_mode = rmode; @@ -424,8 +424,8 @@ static RETSIGTYPE sa_sigalrmhandler(int signum) * * Install a callback for freq events, to be called when in transceive mode. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_set_trn() @@ -450,8 +450,8 @@ int HAMLIB_API rig_set_freq_callback(RIG *rig, freq_cb_t cb, rig_ptr_t arg) * * Install a callback for mode events, to be called when in transceive mode. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_set_trn() @@ -476,8 +476,8 @@ int HAMLIB_API rig_set_mode_callback(RIG *rig, mode_cb_t cb, rig_ptr_t arg) * * Install a callback for vfo events, to be called when in transceive mode. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_set_trn() @@ -502,8 +502,8 @@ int HAMLIB_API rig_set_vfo_callback(RIG *rig, vfo_cb_t cb, rig_ptr_t arg) * * Install a callback for ptt events, to be called when in transceive mode. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_set_trn() @@ -528,8 +528,8 @@ int HAMLIB_API rig_set_ptt_callback(RIG *rig, ptt_cb_t cb, rig_ptr_t arg) * * Install a callback for dcd events, to be called when in transceive mode. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_set_trn() @@ -556,8 +556,8 @@ int HAMLIB_API rig_set_dcd_callback(RIG *rig, dcd_cb_t cb, rig_ptr_t arg) * Install a callback for pipelined tuning module, to be called when the * rig_scan( SCAN_PLT ) loop needs a new frequency, mode and width. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_set_trn() @@ -575,14 +575,14 @@ int HAMLIB_API rig_set_pltune_callback(RIG *rig, pltune_cb_t cb, rig_ptr_t arg) } /** - * \brief control the transceive mode + * \brief control the transceive mode * \param rig The rig handle * \param trn The transceive status to set to * * Enable/disable the transceive handling of a rig and kick off async mode. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_get_trn() @@ -693,11 +693,11 @@ int HAMLIB_API rig_set_trn(RIG *rig, int trn) * \param rig The rig handle * \param trn The location where to store the current transceive mode * - * Retrieves the current status of the transceive mode, i.e. if radio + * Retrieves the current status of the transceive mode, i.e. if radio * sends new status automatically when some changes happened on the radio. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_set_trn() diff --git a/src/event.h b/src/event.h index e98c508a5..e64f749ee 100644 --- a/src/event.h +++ b/src/event.h @@ -2,21 +2,20 @@ * Hamlib Interface - event handling header * Copyright (c) 2000-2003 by Stephane Fillod and Frank Singleton * - * $Id: event.h,v 1.3 2003-08-17 22:39:07 fillods 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 - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ diff --git a/src/ext.c b/src/ext.c index c16cb28c5..2cd844288 100644 --- a/src/ext.c +++ b/src/ext.c @@ -2,21 +2,20 @@ * Hamlib Interface - extrq parameter interface * Copyright (c) 2000-2008 by Stephane Fillod * - * $Id: ext.c,v 1.7 2008-04-11 14:12:26 fillods 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 - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ /** diff --git a/src/idx_builtin.h b/src/idx_builtin.h index e64e47c89..bb098d9ef 100644 --- a/src/idx_builtin.h +++ b/src/idx_builtin.h @@ -2,21 +2,20 @@ * Hamlib Interface - setting2idx for builtin constants * Copyright (c) 2002-2005 by Stephane Fillod and Frank Singleton * - * $Id: idx_builtin.h,v 1.4 2005-04-20 13:28:14 fillods 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 - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ diff --git a/src/iofunc.c b/src/iofunc.c index 4b7110f9a..283739f68 100644 --- a/src/iofunc.c +++ b/src/iofunc.c @@ -3,21 +3,20 @@ * Copyright (c) 2000-2009 by Stephane Fillod * Copyright (c) 2000-2003 by Frank Singleton * - * $Id: iofunc.c,v 1.20 2008-11-05 23:07:38 fillods 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 - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ @@ -74,14 +73,14 @@ int HAMLIB_API port_open(hamlib_port_t *p) return status; if (p->parm.serial.rts_state != RIG_SIGNAL_UNSET && p->parm.serial.handshake != RIG_HANDSHAKE_HARDWARE) { - status = ser_set_rts(p, + status = ser_set_rts(p, p->parm.serial.rts_state == RIG_SIGNAL_ON); want_state_delay = 1; } if (status != 0) return status; if (p->parm.serial.dtr_state != RIG_SIGNAL_UNSET) { - status = ser_set_dtr(p, + status = ser_set_dtr(p, p->parm.serial.dtr_state == RIG_SIGNAL_ON); want_state_delay = 1; } @@ -299,14 +298,14 @@ int HAMLIB_API write_block(hamlib_port_t *p, const char *txbuffer, size_t count) /* FIXME in Y2038 ... */ gettimeofday(&tv, NULL); - date_delay = p->post_write_delay*1000 - + date_delay = p->post_write_delay*1000 - ((tv.tv_sec - p->post_write_date.tv_sec)*1000000 + (tv.tv_usec - p->post_write_date.tv_usec)); if (date_delay > 0) { /* - * optional delay after last write + * optional delay after last write */ - usleep(date_delay); + usleep(date_delay); } p->post_write_date.tv_sec = 0; } @@ -316,7 +315,7 @@ int HAMLIB_API write_block(hamlib_port_t *p, const char *txbuffer, size_t count) for (i=0; i < count; i++) { ret = port_write(p, txbuffer+i, 1); if (ret != 1) { - rig_debug(RIG_DEBUG_ERR,"%s():%d failed %d - %s\n", + rig_debug(RIG_DEBUG_ERR,"%s():%d failed %d - %s\n", __FUNCTION__, __LINE__, ret, strerror(errno)); return -RIG_EIO; } @@ -325,12 +324,12 @@ int HAMLIB_API write_block(hamlib_port_t *p, const char *txbuffer, size_t count) } else { ret = port_write(p, txbuffer, count); if (ret != count) { - rig_debug(RIG_DEBUG_ERR,"%s():%d failed %d - %s\n", + rig_debug(RIG_DEBUG_ERR,"%s():%d failed %d - %s\n", __FUNCTION__, __LINE__, ret, strerror(errno)); return -RIG_EIO; } } - + if (p->post_write_delay > 0) { #ifdef WANT_NON_ACTIVE_POST_WRITE_DELAY #define POST_WRITE_DELAY_TRSHLD 10 @@ -349,7 +348,7 @@ int HAMLIB_API write_block(hamlib_port_t *p, const char *txbuffer, size_t count) } rig_debug(RIG_DEBUG_TRACE,"TX %d bytes\n",count); dump_hex((unsigned char *) txbuffer,count); - + return RIG_OK; } @@ -363,7 +362,7 @@ int HAMLIB_API write_block(hamlib_port_t *p, const char *txbuffer, size_t count) * * Read "num" bytes from "fd" and put results into * an array of unsigned char pointed to by "rxbuffer" - * + * * Blocks on read until timeout hits. * * It then reads "num" bytes into rxbuffer. @@ -373,7 +372,7 @@ int HAMLIB_API write_block(hamlib_port_t *p, const char *txbuffer, size_t count) */ int HAMLIB_API read_block(hamlib_port_t *p, char *rxbuffer, size_t count) -{ +{ fd_set rfds, efds; struct timeval tv, tv_timeout; int rd_count, total_count = 0; @@ -407,7 +406,7 @@ int HAMLIB_API read_block(hamlib_port_t *p, char *rxbuffer, size_t count) return -RIG_EIO; } if (FD_ISSET(p->fd, &efds)) { - rig_debug(RIG_DEBUG_ERR, "%s: fd error after %d chars\n", + rig_debug(RIG_DEBUG_ERR, "%s: fd error after %d chars\n", __FUNCTION__, total_count); return -RIG_EIO; } @@ -484,12 +483,12 @@ int HAMLIB_API read_string(hamlib_port_t *p, char *rxbuffer, size_t rxmax, const if (retval < 0) { dump_hex((unsigned char *) rxbuffer, total_count); - rig_debug(RIG_DEBUG_ERR, "%s: select error after %d chars: %s\n", + rig_debug(RIG_DEBUG_ERR, "%s: select error after %d chars: %s\n", __FUNCTION__, total_count, strerror(errno)); return -RIG_EIO; } if (FD_ISSET(p->fd, &efds)) { - rig_debug(RIG_DEBUG_ERR, "%s: fd error after %d chars\n", + rig_debug(RIG_DEBUG_ERR, "%s: fd error after %d chars\n", __FUNCTION__, total_count); return -RIG_EIO; } diff --git a/src/iofunc.h b/src/iofunc.h index 8273e2152..3926e7cc6 100644 --- a/src/iofunc.h +++ b/src/iofunc.h @@ -2,21 +2,20 @@ * Hamlib Interface - io function header * Copyright (c) 2000-2005 by Stephane Fillod and Frank Singleton * - * $Id: iofunc.h,v 1.5 2005-04-03 12:27:16 fillods 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 - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ diff --git a/src/locator.c b/src/locator.c index 72d09aa6e..863850f5c 100644 --- a/src/locator.c +++ b/src/locator.c @@ -18,7 +18,6 @@ * Copyright (c) 2003 by Nate Bargmann * Copyright (c) 2003 by Dave Hines * - * $Id: locator.c,v 1.21 2009-02-20 12:26:13 fillods Exp $ * * Code to determine bearing and range was taken from the Great Circle, * by S. R. Sampson, N5OWK. @@ -32,20 +31,19 @@ * http://williams.best.vwh.net/avform.htm#Crs * * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ diff --git a/src/mem.c b/src/mem.c index d25bc5360..a357b0552 100644 --- a/src/mem.c +++ b/src/mem.c @@ -9,26 +9,26 @@ * \date 2000-2011 * * Hamlib interface is a frontend implementing wrapper functions. - * + * */ /* * Hamlib Interface - mem/channel calls * Copyright (c) 2000-2011 by Stephane Fillod * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ @@ -63,8 +63,8 @@ * It is not mandatory for the radio to be in memory mode. Actually * it depends on rigs. YMMV. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_get_mem() @@ -110,8 +110,8 @@ int HAMLIB_API rig_set_mem(RIG *rig, vfo_t vfo, int ch) * It is not mandatory for the radio to be in memory mode. Actually * it depends on rigs. YMMV. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_set_mem() @@ -157,8 +157,8 @@ int HAMLIB_API rig_get_mem(RIG *rig, vfo_t vfo, int *ch) * It is not mandatory for the radio to be in memory mode. Actually * it depends on rigs. YMMV. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_set_mem() @@ -177,7 +177,7 @@ int HAMLIB_API rig_set_bank(RIG *rig, vfo_t vfo, int bank) if (caps->set_bank == NULL) return -RIG_ENAVAIL; - + if ((caps->targetable_vfo&RIG_TARGETABLE_PURE) || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) return caps->set_bank(rig, vfo, bank); @@ -379,7 +379,7 @@ static int generic_save_channel(RIG *rig, channel_t *chan) rig_get_dcs_code(rig, RIG_VFO_CURR, &chan->dcs_code); if (mem_cap->dcs_sql) rig_get_dcs_sql(rig, RIG_VFO_CURR, &chan->dcs_sql); - /* + /* * TODO: (missing calls) * - channel_desc * - bank_num @@ -451,7 +451,7 @@ static int generic_restore_channel(RIG *rig, const channel_t *chan) for (i=0; ifuncs) - rig_set_func(rig, RIG_VFO_CURR, setting, + rig_set_func(rig, RIG_VFO_CURR, setting, chan->funcs & rig_idx2setting(i)); } @@ -464,7 +464,7 @@ static int generic_restore_channel(RIG *rig, const channel_t *chan) if (mem_cap->dcs_sql) rig_set_dcs_sql(rig, RIG_VFO_CURR, chan->dcs_sql); - /* + /* * TODO: (missing calls) * - channel_desc * - bank_num @@ -493,8 +493,8 @@ static int generic_restore_channel(RIG *rig, const channel_t *chan) * and memory number selected. Depending on backend and rig capabilities, * the chan struct may not be set completely. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_get_channel() @@ -613,12 +613,12 @@ int HAMLIB_API rig_set_channel(RIG *rig, const channel_t *chan) * and memory number selected. Depending on backend and rig capabilities, * the chan struct may not be filled in completely. * - * Note: chan->ext_levels is a pointer to a newly mallocated memory. + * Note: chan->ext_levels is a pointer to a newly mallocated memory. * This is the responsability of the caller to manage and eventually * free it. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_set_channel() @@ -717,7 +717,7 @@ int get_chan_all_cb_generic (RIG *rig, chan_cb_t chan_cb, rig_ptr_t arg) channel_t *chan; for (i=0; !RIG_IS_CHAN_END(chan_list[i]) && i < CHANLSTSIZ; i++) { - + /* * setting chan to NULL means the application * has to provide a struct where to store data @@ -816,8 +816,8 @@ static int map_chan (RIG *rig, channel_t **chan, int channel_num, const chan_t * * Write the data associated with a all the memory channels. * This is the prefered method to support clonable rigs. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_set_chan_all(), rig_get_chan_all_cb() @@ -851,13 +851,13 @@ int HAMLIB_API rig_set_chan_all_cb (RIG *rig, chan_cb_t chan_cb, rig_ptr_t arg) * Retrieves the data associated with a all the memory channels. * This is the prefered method to support clonable rigs. * - * \a chan_cb is called first with no data in chan (chan equals NULL). - * This means the application has to provide a struct where to store + * \a chan_cb is called first with no data in chan (chan equals NULL). + * This means the application has to provide a struct where to store * future data for channel channel_num. If channel_num == chan->channel_num, * the application does not need to provide a new allocated structure. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_get_chan_all(), rig_set_chan_all_cb() @@ -890,8 +890,8 @@ int HAMLIB_API rig_get_chan_all_cb (RIG *rig, chan_cb_t chan_cb, rig_ptr_t arg) * * Write the data associated with all the memory channels. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_set_chan_all_cb(), rig_get_chan_all() @@ -926,8 +926,8 @@ int HAMLIB_API rig_set_chan_all (RIG *rig, const channel_t chans[]) * * Retrieves the data associated with all the memory channels. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_get_chan_all_cb(), rig_set_chan_all() @@ -1007,8 +1007,8 @@ int set_parm_all_cb_generic (RIG *rig, confval_cb_t parm_cb, rig_ptr_t cfgps, * and rigs memory parameters, by callback. * This is the prefered method to support clonable rigs. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_get_mem_all_cb(), rig_set_mem_all() @@ -1055,8 +1055,8 @@ int HAMLIB_API rig_set_mem_all_cb (RIG *rig, chan_cb_t chan_cb, confval_cb_t par * and rigs memory parameters, by callback. * This is the prefered method to support clonable rigs. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_get_mem_all_cb(), rig_set_mem_all() @@ -1104,8 +1104,8 @@ int HAMLIB_API rig_get_mem_all_cb (RIG *rig, chan_cb_t chan_cb, confval_cb_t par * Writes the data associated with all the memory channels, * and rigs memory parameters. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_get_mem_all(), rig_set_mem_all_cb() @@ -1158,8 +1158,8 @@ int HAMLIB_API rig_set_mem_all (RIG *rig, const channel_t chans[], const struct * and rigs memory parameters. * This is the prefered method to support clonable rigs. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_get_mem_all(), rig_set_mem_all_cb() diff --git a/src/misc.c b/src/misc.c index 6890ce47d..b5c820802 100644 --- a/src/misc.c +++ b/src/misc.c @@ -2,19 +2,19 @@ * Hamlib Interface - toolbox * Copyright (c) 2000-2011 by Stephane Fillod * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ @@ -62,7 +62,7 @@ * packed two digits per octet, in little-endian order * (e.g. byte order 90 78 56 34 12 for 1234567890 Hz). * - * bcd_len is the number of BCD digits, usually 10 or 8 in 1-Hz units, + * bcd_len is the number of BCD digits, usually 10 or 8 in 1-Hz units, * and 6 digits in 100-Hz units for Tx offset data. * * Hope the compiler will do a good job optimizing it (esp. w/the 64bit freq) @@ -125,7 +125,7 @@ unsigned long long HAMLIB_API from_bcd(const unsigned char bcd_data[], unsigned f *= 10; f += bcd_data[i] & 0x0f; } - + return f; } @@ -254,7 +254,7 @@ const char * HAMLIB_API rig_strstatus(enum rig_status_e status) } -static struct { +static struct { rmode_t mode; const char *str; } mode_str[] = { @@ -319,7 +319,7 @@ const char * HAMLIB_API rig_strrmode(rmode_t mode) return ""; } -static struct { +static struct { vfo_t vfo; const char *str; } vfo_str[] = { @@ -374,8 +374,8 @@ const char * HAMLIB_API rig_strvfo(vfo_t vfo) return ""; } -static struct { - setting_t func; +static struct { + setting_t func; const char *str; } func_str[] = { { RIG_FUNC_FAGC, "FAGC" }, @@ -450,7 +450,7 @@ const char * HAMLIB_API rig_strfunc(setting_t func) return ""; } -static struct { +static struct { setting_t level; const char *str; } level_str[] = { @@ -527,7 +527,7 @@ const char * HAMLIB_API rig_strlevel(setting_t level) return ""; } -static struct { +static struct { setting_t parm; const char *str; } parm_str[] = { @@ -580,7 +580,7 @@ const char * HAMLIB_API rig_strparm(setting_t parm) return ""; } -static struct { +static struct { vfo_op_t vfo_op; const char *str; } vfo_op_str[] = { @@ -639,7 +639,7 @@ const char * HAMLIB_API rig_strvfop(vfo_op_t op) return ""; } -static struct { +static struct { scan_t rscan; const char *str; } scan_str[] = { @@ -723,7 +723,7 @@ rptr_shift_t HAMLIB_API rig_parse_rptr_shift(const char *s) return RIG_RPT_SHIFT_NONE; } -static struct { +static struct { chan_type_t mtype; const char *str; } mtype_str[] = { diff --git a/src/misc.h b/src/misc.h index b44227de8..2eb85d297 100644 --- a/src/misc.h +++ b/src/misc.h @@ -2,21 +2,20 @@ * Hamlib Interface - toolbox header * Copyright (c) 2000-2004 by Stephane Fillod * - * $Id: misc.h,v 1.18 2005-01-24 23:03:25 fillods 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 - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ @@ -47,7 +46,7 @@ void dump_hex(const unsigned char ptr[], size_t size); * BCD conversion routines. * to_bcd converts a long long int to a little endian BCD array, * and return a pointer to this array. - * from_bcd converts a little endian BCD array to long long int + * from_bcd converts a little endian BCD array to long long int * reprensentation, and return it. * bcd_len is the number of digits in the BCD array. */ @@ -78,9 +77,9 @@ extern HAMLIB_EXPORT(int) rig_check_cache_timeout(const struct timeval *tv, int extern HAMLIB_EXPORT(void) rig_force_cache_timeout(struct timeval *tv); -#ifdef PRId64 +#ifdef PRId64 /** \brief printf(3) format to be used for long long (64bits) type */ -#define PRIll PRId64 +#define PRIll PRId64 #else #ifdef FBSD4 #define PRIll "qd" @@ -89,9 +88,9 @@ extern HAMLIB_EXPORT(void) rig_force_cache_timeout(struct timeval *tv); #endif #endif -#ifdef SCNd64 +#ifdef SCNd64 /** \brief scanf(3) format to be used for long long (64bits) type */ -#define SCNll SCNd64 +#define SCNll SCNd64 #else #ifdef FBSD4 #define SCNll "qd" diff --git a/src/network.c b/src/network.c index 53661f41c..f45231852 100644 --- a/src/network.c +++ b/src/network.c @@ -2,19 +2,19 @@ * Hamlib Interface - network communication low-level support * Copyright (c) 2000-2010 by Stephane Fillod * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ @@ -118,7 +118,7 @@ int network_open(hamlib_port_t *rp, int default_port) portstr = defaultportstr; } } - + status=getaddrinfo(hostname, portstr, &hints, &res); if (status != 0) { rig_debug(RIG_DEBUG_ERR, "Cannot get host \"%s\": %s\n", diff --git a/src/network.h b/src/network.h index 9dedd9347..c3cc6a8d9 100644 --- a/src/network.h +++ b/src/network.h @@ -2,21 +2,20 @@ * Hamlib Interface - network communication header * Copyright (c) 2000-2008 by Stephane Fillod * - * $Id: network.h,v 1.3 2008-11-05 23:02:00 fillods 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 - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ diff --git a/src/parallel.c b/src/parallel.c index 975f124d9..bdb6fa219 100644 --- a/src/parallel.c +++ b/src/parallel.c @@ -3,19 +3,19 @@ * Copyright (c) 2000-2010 by Stephane Fillod * * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ @@ -73,7 +73,7 @@ #include #endif -/* +/* * These control port bits are active low. * We toggle them so that this weirdness doesn't get propagated * through our interface. @@ -199,7 +199,7 @@ int HAMLIB_API par_write_data(hamlib_port_t *port, unsigned char data) #elif defined(WIN32) unsigned int dummy; - if (!(DeviceIoControl((HANDLE)(port->fd), NT_IOCTL_DATA, &data, sizeof(data), + if (!(DeviceIoControl((HANDLE)(port->fd), NT_IOCTL_DATA, &data, sizeof(data), NULL, 0, (LPDWORD)&dummy, NULL))) { rig_debug(RIG_DEBUG_ERR, "%s: DeviceIoControl failed!\n", __FUNCTION__); return -RIG_EIO; @@ -229,7 +229,7 @@ int HAMLIB_API par_read_data(hamlib_port_t *port, unsigned char *data) unsigned char ret; unsigned int dummy; - if (!(DeviceIoControl((HANDLE)(port->fd), NT_IOCTL_STATUS, NULL, 0, &ret, + if (!(DeviceIoControl((HANDLE)(port->fd), NT_IOCTL_STATUS, NULL, 0, &ret, sizeof(ret), (LPDWORD)&dummy, NULL))) { rig_debug(RIG_DEBUG_ERR, "%s: DeviceIoControl failed!\n", __FUNCTION__); return -RIG_EIO; @@ -278,7 +278,7 @@ int HAMLIB_API par_write_control(hamlib_port_t *port, unsigned char control) /* Deal with inversion issues. */ ctr ^= wm & C1284_INVERTED; ctr = (ctr & ~wm) ^ (ctr & wm); - if (!(DeviceIoControl((HANDLE)(port->fd), NT_IOCTL_CONTROL, &ctr, + if (!(DeviceIoControl((HANDLE)(port->fd), NT_IOCTL_CONTROL, &ctr, sizeof(ctr), &dummyc, sizeof(dummyc), (LPDWORD)&dummy, NULL))) { rig_debug(RIG_DEBUG_ERR,"frob_control: DeviceIoControl failed!\n"); return -RIG_EIO; @@ -314,7 +314,7 @@ int HAMLIB_API par_read_control(hamlib_port_t *port, unsigned char *control) unsigned char ret; unsigned int dummy; - if (!(DeviceIoControl((HANDLE)(port->fd), NT_IOCTL_CONTROL, NULL, 0, &ret, + if (!(DeviceIoControl((HANDLE)(port->fd), NT_IOCTL_CONTROL, NULL, 0, &ret, sizeof(ret), (LPDWORD)&dummy, NULL))) { rig_debug(RIG_DEBUG_ERR, "%s: DeviceIoControl failed!\n", __FUNCTION__); return -RIG_EIO; @@ -351,7 +351,7 @@ int HAMLIB_API par_read_status(hamlib_port_t *port, unsigned char *status) unsigned char ret; unsigned int dummy; - if (!(DeviceIoControl((HANDLE)(port->fd), NT_IOCTL_STATUS, NULL, 0, &ret, + if (!(DeviceIoControl((HANDLE)(port->fd), NT_IOCTL_STATUS, NULL, 0, &ret, sizeof(ret), (LPDWORD)&dummy, NULL))) { rig_debug(RIG_DEBUG_ERR, "%s: DeviceIoControl failed!\n", __FUNCTION__); return -RIG_EIO; @@ -450,7 +450,7 @@ int par_ptt_set(hamlib_port_t *p, ptt_t pttx) return status; } default: - rig_debug(RIG_DEBUG_ERR,"Unsupported PTT type %d\n", + rig_debug(RIG_DEBUG_ERR,"Unsupported PTT type %d\n", p->type.ptt); return -RIG_EINVAL; } @@ -476,12 +476,12 @@ int par_ptt_get(hamlib_port_t *p, ptt_t *pttx) par_unlock (p); *pttx = (ctl & PARPORT_CONTROL_INIT) && - !(ctl & PARPORT_CONTROL_STROBE) ? + !(ctl & PARPORT_CONTROL_STROBE) ? RIG_PTT_ON : RIG_PTT_OFF; return status; } default: - rig_debug(RIG_DEBUG_ERR,"Unsupported PTT type %d\n", + rig_debug(RIG_DEBUG_ERR,"Unsupported PTT type %d\n", p->type.ptt); return -RIG_ENAVAIL; } @@ -503,12 +503,12 @@ int par_dcd_get(hamlib_port_t *p, dcd_t *dcdx) int status; status = par_read_data(p, ®); - *dcdx = reg & (1<parm.parallel.pin) ? + *dcdx = reg & (1<parm.parallel.pin) ? RIG_DCD_ON:RIG_DCD_OFF; return status; } default: - rig_debug(RIG_DEBUG_ERR,"Unsupported DCD type %d\n", + rig_debug(RIG_DEBUG_ERR,"Unsupported DCD type %d\n", p->type.dcd); return -RIG_ENAVAIL; } diff --git a/src/parallel.h b/src/parallel.h index 5fe01bcdf..265ee8f7d 100644 --- a/src/parallel.h +++ b/src/parallel.h @@ -4,19 +4,19 @@ * Copyright (c) 2000-2010 by Stephane Fillod * * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ diff --git a/src/register.c b/src/register.c index 172a5205a..75c487de8 100644 --- a/src/register.c +++ b/src/register.c @@ -2,21 +2,20 @@ * Hamlib Interface - provides registering for dynamically loadable backends. * Copyright (c) 2000-2005 by Stephane Fillod * - * $Id: register.c,v 1.24 2006-10-15 00:27:51 aa6e 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 - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ @@ -142,7 +141,7 @@ static int rig_lookup_backend(rig_model_t rig_model) int i; for (i=0; istate struct. */ static const struct confparams rotfrontend_cfg_params[] = { - { TOK_PATHNAME, "rot_pathname", "Rig path name", + { TOK_PATHNAME, "rot_pathname", "Rig path name", "Path name to the device file of the rotator", - "/dev/rotator", RIG_CONF_STRING, + "/dev/rotator", RIG_CONF_STRING, }, - { TOK_WRITE_DELAY, "write_delay", "Write delay", + { TOK_WRITE_DELAY, "write_delay", "Write delay", "Delay in ms between each byte sent out", "0", RIG_CONF_NUMERIC, { .n = { 0, 1000, 1 } } }, - { TOK_POST_WRITE_DELAY, "post_write_delay", "Post write delay", + { TOK_POST_WRITE_DELAY, "post_write_delay", "Post write delay", "Delay in ms between each command sent out", "0", RIG_CONF_NUMERIC, { .n = { 0, 1000, 1 } } }, @@ -89,23 +89,23 @@ static const struct confparams rotfrontend_cfg_params[] = { }; static const struct confparams rotfrontend_serial_cfg_params[] = { - { TOK_SERIAL_SPEED, "serial_speed", "Serial speed", + { TOK_SERIAL_SPEED, "serial_speed", "Serial speed", "Serial port baud rate", "0", RIG_CONF_NUMERIC, { .n = { 300, 115200, 1 } } }, - { TOK_DATA_BITS, "data_bits", "Serial data bits", + { TOK_DATA_BITS, "data_bits", "Serial data bits", "Serial port data bits", "8", RIG_CONF_NUMERIC, { .n = { 5, 8, 1 } } }, - { TOK_STOP_BITS, "stop_bits", "Serial stop bits", + { TOK_STOP_BITS, "stop_bits", "Serial stop bits", "Serial port stop bits", "1", RIG_CONF_NUMERIC, { .n = { 0, 3, 1 } } }, - { TOK_PARITY, "serial_parity", "Serial parity", + { TOK_PARITY, "serial_parity", "Serial parity", "Serial port parity", "None", RIG_CONF_COMBO, { .c = {{ "None", "Odd", "Even", "Mark", "Space", NULL }} } }, - { TOK_HANDSHAKE, "serial_handshake", "Serial handshake", + { TOK_HANDSHAKE, "serial_handshake", "Serial handshake", "Serial port handshake", "None", RIG_CONF_COMBO, { .c = {{ "None", "XONXOFF", "Hardware", NULL }} } }, @@ -190,7 +190,7 @@ int frontrot_set_conf(ROT *rot, token_t token, const char *val) rs->rotport.parm.serial.parity = RIG_PARITY_MARK; else if (!strcmp(val, "Space")) rs->rotport.parm.serial.parity = RIG_PARITY_SPACE; - else + else return -RIG_EINVAL; break; case TOK_HANDSHAKE: @@ -202,7 +202,7 @@ int frontrot_set_conf(ROT *rot, token_t token, const char *val) rs->rotport.parm.serial.handshake = RIG_HANDSHAKE_XONXOFF; else if (!strcmp(val, "Hardware")) rs->rotport.parm.serial.handshake = RIG_HANDSHAKE_HARDWARE; - else + else return -RIG_EINVAL; break; @@ -319,7 +319,7 @@ int frontrot_get_conf(ROT *rot, token_t token, char *val) * \param rot non-null * \param cfunc function(..) * \param data - * + * * start first with backend conf table, then finish with frontend table */ int HAMLIB_API rot_token_foreach(ROT *rot, int (*cfunc)(const struct confparams *, rig_ptr_t), rig_ptr_t data) @@ -385,7 +385,7 @@ const struct confparams * HAMLIB_API rot_confparam_lookup(ROT *rot, const char * * \brief Simple lookup returning token id associated with name * \param rot * \param name - * \return token enum + * \return token enum */ token_t HAMLIB_API rot_token_lookup(ROT *rot, const char *name) { @@ -404,10 +404,10 @@ token_t HAMLIB_API rot_token_lookup(ROT *rot, const char *name) * \param token The parameter * \param val The value to set the parameter to * - * Sets a configuration parameter. + * Sets a configuration parameter. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rot_get_conf() @@ -444,8 +444,8 @@ int HAMLIB_API rot_set_conf(ROT *rot, token_t token, const char *val) * * Retrieves the value of a configuration paramter associated with \a token. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rot_set_conf() diff --git a/src/rot_conf.h b/src/rot_conf.h index d0c6161b1..d7b0bb173 100644 --- a/src/rot_conf.h +++ b/src/rot_conf.h @@ -2,21 +2,20 @@ * Hamlib Interface - configuration header * Copyright (c) 2000,2001,2002 by Stephane Fillod and Frank Singleton * - * $Id: rot_conf.h,v 1.2 2002-01-27 14:55:30 fillods 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 - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ diff --git a/src/rot_reg.c b/src/rot_reg.c index 34bccddae..15141a12f 100644 --- a/src/rot_reg.c +++ b/src/rot_reg.c @@ -2,21 +2,20 @@ * Hamlib Interface - provides registering for dynamically loadable backends. * Copyright (c) 2000-2004 by Stephane Fillod * - * $Id: rot_reg.c,v 1.10 2006-10-15 00:27:52 aa6e 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 - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ @@ -144,7 +143,7 @@ static int rot_lookup_backend(rot_model_t rot_model) int i; for (i=0; inext) { @@ -163,7 +163,7 @@ int foreach_opened_rot(int (*cfunc)(ROT *, rig_ptr_t), rig_ptr_t data) * \brief allocate a new #ROT handle * \param rot_model The rot model for this new handle * - * Allocates a new #ROT handle and initializes the associated data + * Allocates a new #ROT handle and initializes the associated data * for \a rot_model. * * \return a pointer to the #ROT handle otherwise NULL if memory allocation @@ -189,8 +189,8 @@ ROT * HAMLIB_API rot_init(rot_model_t rot_model) /* * okay, we've found it. Allocate some memory and set it to zeros, - * and especially the initialize the callbacks - */ + * and especially the initialize the callbacks + */ rot = calloc(1, sizeof(ROT)); if (rot == NULL) { /* @@ -206,7 +206,7 @@ ROT * HAMLIB_API rot_init(rot_model_t rot_model) /* * populate the rot->state - * TODO: read the Preferences here! + * TODO: read the Preferences here! */ rs = &rot->state; @@ -248,7 +248,7 @@ ROT * HAMLIB_API rot_init(rot_model_t rot_model) rs->rotport.fd = -1; - /* + /* * let the backend a chance to setup his private data * This must be done only once defaults are setup, * so the backend init can override rot_state. @@ -273,8 +273,8 @@ ROT * HAMLIB_API rot_init(rot_model_t rot_model) * Opens communication to a rotator which \a ROT handle has been passed * by argument. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \retval RIG_EINVAL \a rot is NULL or unconsistent. @@ -347,12 +347,12 @@ int HAMLIB_API rot_open(ROT *rot) rs->comm_state = 1; - /* + /* * Maybe the backend has something to initialize * In case of failure, just close down and report error code. */ if (caps->rot_open != NULL) { - status = caps->rot_open(rot); + status = caps->rot_open(rot); if (status != RIG_OK) { return status; } @@ -368,8 +368,8 @@ int HAMLIB_API rot_open(ROT *rot) * Closes communication to a rotator which \a ROT handle has been passed * by argument that was previously open with rot_open(). * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rot_cleanup(), rot_open() @@ -430,11 +430,11 @@ int HAMLIB_API rot_close(ROT *rot) * \brief release a rot handle and free associated memory * \param rot The #ROT handle of the radio to be closed * - * Releases a rot struct which port has eventualy been closed already + * Releases a rot struct which port has eventualy been closed already * with rot_close(). * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rot_init(), rot_close() @@ -454,7 +454,7 @@ int HAMLIB_API rot_cleanup(ROT *rot) rot_close(rot); /* - * basically free up the priv struct + * basically free up the priv struct */ if (rot->caps->rot_cleanup) rot->caps->rot_cleanup(rot); @@ -508,8 +508,8 @@ int HAMLIB_API rot_set_position (ROT *rot, azimuth_t azimuth, elevation_t elevat * * Retrieves the current azimuth and elevation of the rotator. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rot_set_position() @@ -536,8 +536,8 @@ int HAMLIB_API rot_get_position (ROT *rot, azimuth_t *azimuth, elevation_t *elev * * Park the antenna. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * */ @@ -563,8 +563,8 @@ int HAMLIB_API rot_park (ROT *rot) * * Stop the rotator. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * */ @@ -591,8 +591,8 @@ int HAMLIB_API rot_stop (ROT *rot) * * Resets the rotator. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * */ @@ -641,9 +641,9 @@ int HAMLIB_API rot_move (ROT *rot, int direction, int speed) * \param rot The rot handle * * Retrieves some general information from the rotator. - * This can include firmware revision, exact model name, or just nothing. + * This can include firmware revision, exact model name, or just nothing. * - * \return a pointer to static memory containing the ASCIIZ string + * \return a pointer to static memory containing the ASCIIZ string * if the operation has been sucessful, otherwise NULL if an error occured * or get_info not part of capabilities. */ diff --git a/src/serial.c b/src/serial.c index 11cfa270c..96d0c2af3 100644 --- a/src/serial.c +++ b/src/serial.c @@ -6,19 +6,19 @@ * ham packet softmodem written by Thomas Sailer, HB9JNX. * * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ @@ -101,14 +101,14 @@ int HAMLIB_API serial_open(hamlib_port_t *rp) { fd = OPEN(rp->pathname, O_RDWR | O_NOCTTY | O_NDELAY); if (fd == -1) { - + /* Could not open the port. */ - - rig_debug(RIG_DEBUG_ERR, "%s: Unable to open %s - %s\n", + + rig_debug(RIG_DEBUG_ERR, "%s: Unable to open %s - %s\n", __func__, rp->pathname, strerror(errno)); return -RIG_EIO; } - + rp->fd = fd; err = serial_setup(rp); @@ -148,7 +148,7 @@ int HAMLIB_API serial_setup(hamlib_port_t *rp) /* * Get the current options for the port... */ - + #if defined(HAVE_TERMIOS_H) tcgetattr(fd, &options); #elif defined(HAVE_TERMIO_H) @@ -200,7 +200,7 @@ int HAMLIB_API serial_setup(hamlib_port_t *rp) speed = B115200; /* awsome! */ break; default: - rig_debug(RIG_DEBUG_ERR, "%s: unsupported rate specified: %d\n", + rig_debug(RIG_DEBUG_ERR, "%s: unsupported rate specified: %d\n", __func__, rp->parm.serial.rate); CLOSE(fd); return -RIG_ECONF; @@ -212,7 +212,7 @@ int HAMLIB_API serial_setup(hamlib_port_t *rp) /* * Enable the receiver and set local mode... */ - + options.c_cflag |= (CLOCAL | CREAD); /* @@ -245,7 +245,7 @@ int HAMLIB_API serial_setup(hamlib_port_t *rp) /* * Set stop bits to requested values. * - */ + */ switch(rp->parm.serial.stop_bits) { case 1: @@ -267,7 +267,7 @@ int HAMLIB_API serial_setup(hamlib_port_t *rp) /* * Set parity to requested values. * - */ + */ switch(rp->parm.serial.parity) { case RIG_PARITY_NONE: @@ -305,7 +305,7 @@ int HAMLIB_API serial_setup(hamlib_port_t *rp) /* * Set flow control to requested mode * - */ + */ switch(rp->parm.serial.handshake) { case RIG_HANDSHAKE_NONE: @@ -356,24 +356,24 @@ int HAMLIB_API serial_setup(hamlib_port_t *rp) /* * Finally, set the new options for the port... */ - + #if defined(HAVE_TERMIOS_H) if (tcsetattr(fd, TCSANOW, &options) == -1) { - rig_debug(RIG_DEBUG_ERR, "%s: tcsetattr failed: %s\n", + rig_debug(RIG_DEBUG_ERR, "%s: tcsetattr failed: %s\n", __func__, strerror(errno)); CLOSE(fd); return -RIG_ECONF; /* arg, so close! */ } #elif defined(HAVE_TERMIO_H) if (IOCTL(fd, TCSETA, &options) == -1) { - rig_debug(RIG_DEBUG_ERR, "%s: ioctl(TCSETA) failed: %s\n", + rig_debug(RIG_DEBUG_ERR, "%s: ioctl(TCSETA) failed: %s\n", __func__, strerror(errno)); CLOSE(fd); return -RIG_ECONF; /* arg, so close! */ } #else /* sgtty */ if (IOCTL(fd, TIOCSETP, &sg) == -1) { - rig_debug(RIG_DEBUG_ERR, "%s: ioctl(TIOCSETP) failed: %s\n", + rig_debug(RIG_DEBUG_ERR, "%s: ioctl(TIOCSETP) failed: %s\n", __func__, strerror(errno)); CLOSE(fd); return -RIG_ECONF; /* arg, so close! */ @@ -468,7 +468,7 @@ int HAMLIB_API ser_set_dtr(hamlib_port_t *p, int state) unsigned int y = TIOCM_DTR; #if defined(TIOCMBIS) && defined(TIOCMBIC) - return IOCTL(p->fd, state ? TIOCMBIS : TIOCMBIC, &y) < 0 ? + return IOCTL(p->fd, state ? TIOCMBIS : TIOCMBIC, &y) < 0 ? -RIG_EIO : RIG_OK; #else if (IOCTL(p->fd, TIOCMGET, &y) < 0) { diff --git a/src/serial.h b/src/serial.h index a6ad24667..8b39b4c34 100644 --- a/src/serial.h +++ b/src/serial.h @@ -2,21 +2,20 @@ * Hamlib Interface - serial communication header * Copyright (c) 2000-2005 by Stephane Fillod and Frank Singleton * - * $Id: serial.h,v 1.27 2005-04-03 12:27:17 fillods 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 - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ diff --git a/src/settings.c b/src/settings.c index a986cf404..9426b12f1 100644 --- a/src/settings.c +++ b/src/settings.c @@ -16,21 +16,20 @@ * Hamlib Interface - func/level/parm * Copyright (c) 2000-2010 by Stephane Fillod * - * $Id: settings.c,v 1.14 2009-02-20 12:26:13 fillods 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 - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ @@ -68,8 +67,8 @@ * The level value \a val can be a float or an integer. See #value_t * for more information. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_has_set_level(), rig_get_level() @@ -122,8 +121,8 @@ int HAMLIB_API rig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) * +30=30, +40=40, +50=50 and +60=60. This is the responsability * of the backend to return values calibrated for this scale. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_has_get_level(), rig_set_level() @@ -145,11 +144,11 @@ int HAMLIB_API rig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) /* * Special case(frontend emulation): calibrated S-meter reading */ - if (level == RIG_LEVEL_STRENGTH && + if (level == RIG_LEVEL_STRENGTH && (caps->has_get_level & RIG_LEVEL_STRENGTH) == 0 && rig_has_get_level(rig,RIG_LEVEL_RAWSTR) && rig->state.str_cal.size) { - + value_t rawstr; retcode = rig_get_level(rig, vfo, RIG_LEVEL_RAWSTR, &rawstr); @@ -182,12 +181,12 @@ int HAMLIB_API rig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) * \param parm The parameter * \param val The value to set the parameter * - * Sets a parameter. + * Sets a parameter. * The parameter value \a val can be a float or an integer. See #value_t * for more information. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_has_set_parm(), rig_get_parm() @@ -213,8 +212,8 @@ int HAMLIB_API rig_set_parm(RIG *rig, setting_t parm, value_t val) * The parameter value \a val can be a float or an integer. See #value_t * for more information. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_has_get_parm(), rig_set_parm() @@ -339,7 +338,7 @@ setting_t HAMLIB_API rig_has_set_parm(RIG *rig, setting_t parm) * * EXAMPLE: if (rig_has_get_func(my_rig,RIG_FUNC_FAGC)) disp_fagc_button(); * - * \return a bit map of supported functions, + * \return a bit map of supported functions, * otherwise 0 if none supported. * * \sa rig_has_set_func(), rig_get_func() @@ -363,7 +362,7 @@ setting_t HAMLIB_API rig_has_get_func(RIG *rig, setting_t func) * * EXAMPLE: if (rig_has_set_func(my_rig,RIG_FUNC_FAGC)) disp_fagc_button(); * - * \return a bit map of supported functions, + * \return a bit map of supported functions, * otherwise 0 if none supported. * * \sa rig_set_func(), rig_has_get_func() @@ -385,11 +384,11 @@ setting_t HAMLIB_API rig_has_set_func(RIG *rig, setting_t func) * * Activate/de-activate a function of the radio. * - * The \a status argument is a non null value for "activate", + * The \a status argument is a non null value for "activate", * "de-activate" otherwise, much as TRUE/FALSE definitions in C language. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_get_func() @@ -434,12 +433,12 @@ int HAMLIB_API rig_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) * * Retrieves the status (on/off) of a function of the radio. * Upon return, \a status will hold the status of the function, - * The value pointer to by the \a status argument is a non null + * The value pointer to by the \a status argument is a non null * value for "on", "off" otherwise, much as TRUE/FALSE * definitions in C language. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_set_func() @@ -481,10 +480,10 @@ int HAMLIB_API rig_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) * \param token The parameter * \param val The value to set the parameter to * - * Sets an level extra parameter. + * Sets an level extra parameter. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_get_ext_level() @@ -528,8 +527,8 @@ int HAMLIB_API rig_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val * * Retrieves the value of a level extra parameter associated with \a token. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_set_ext_level() @@ -570,10 +569,10 @@ int HAMLIB_API rig_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *va * \param token The parameter * \param val The value to set the parameter to * - * Sets an parm extra parameter. + * Sets an parm extra parameter. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_get_ext_parm() @@ -597,8 +596,8 @@ int HAMLIB_API rig_set_ext_parm(RIG *rig, token_t token, value_t val) * * Retrieves the value of a parm extra parameter associated with \a token. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_set_ext_parm() diff --git a/src/token.h b/src/token.h index 6164265b4..a9dbe7b27 100644 --- a/src/token.h +++ b/src/token.h @@ -2,21 +2,20 @@ * Hamlib Interface - token header * Copyright (c) 2000-2009 by Stephane Fillod * - * $Id: token.h,v 1.5 2006-10-28 03:49:46 aa6e 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 - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ @@ -28,7 +27,7 @@ /** * \brief Token definitions * \file token.h - * + * */ #ifndef _TOKEN_H diff --git a/src/tones.c b/src/tones.c index c3361a733..e937fa758 100644 --- a/src/tones.c +++ b/src/tones.c @@ -13,21 +13,20 @@ * Hamlib Interface - CTCSS and DCS interface and tables * Copyright (c) 2000-2010 by Stephane Fillod * - * $Id: tones.c,v 1.11 2009-02-20 12:26:13 fillods 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 - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ @@ -51,7 +50,7 @@ const tone_t full_ctcss_list[] = { FULL_CTCSS_LIST }; * 50 CTCSS sub-audible tones, from 67.0Hz to 254.1Hz * * \note Don't even think about changing a bit of this array, several - * 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 */ const tone_t common_ctcss_list[] = { COMMON_CTCSS_LIST }; @@ -82,7 +81,7 @@ const tone_t full_dcs_list[] = { FULL_DCS_LIST }; * \param vfo The target VFO * \param tone The tone to set to * - * Sets the current Continuous Tone Controlled Squelch System (CTCSS) + * Sets the current Continuous Tone Controlled Squelch System (CTCSS) * sub-audible tone frequency. * \note the \a tone integer is NOT in Hz, but in tenth of Hz! This way, * if you want to set a subaudible tone of 88.5 Hz for example, @@ -92,8 +91,8 @@ const tone_t full_dcs_list[] = { FULL_DCS_LIST }; * a call to rig_set_func() with arg RIG_FUNC_TONE, unless it is * unavailable and the \a tone arg has to be set to 0. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_get_ctcss_tone(), rig_set_ctcss_sql() @@ -113,7 +112,7 @@ int HAMLIB_API rig_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone) if (caps->set_ctcss_tone == NULL) return -RIG_ENAVAIL; - if ((caps->targetable_vfo&RIG_TARGETABLE_TONE) || + if ((caps->targetable_vfo&RIG_TARGETABLE_TONE) || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) return caps->set_ctcss_tone(rig, vfo, tone); @@ -135,15 +134,15 @@ int HAMLIB_API rig_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone) * \param vfo The target VFO * \param tone The location where to store the current tone * - * Retrieves the current Continuous Tone Controlled Squelch System (CTCSS) + * Retrieves the current Continuous Tone Controlled Squelch System (CTCSS) * sub-audible tone frequency. * \note the \a *tone integer is NOT in Hz, but in tenth of Hz! This way, * if the function rig_get_ctcss_tone() returns a subaudible tone of 885 - * for example, then the real tone is 88.5 Hz. + * for example, then the real tone is 88.5 Hz. * Also, a value of 0 for \a *tone means the Tone encoding is disabled. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_set_ctcss_tone(), rig_get_ctcss_sql() @@ -162,7 +161,7 @@ int HAMLIB_API rig_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone) if (caps->get_ctcss_tone == NULL) return -RIG_ENAVAIL; - if ((caps->targetable_vfo&RIG_TARGETABLE_TONE) || + if ((caps->targetable_vfo&RIG_TARGETABLE_TONE) || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) return caps->get_ctcss_tone(rig, vfo, tone); @@ -186,8 +185,8 @@ int HAMLIB_API rig_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone) * * Sets the current encoding Digitally-Coded Squelch code. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_get_dcs_code(), rig_set_dcs_sql() @@ -207,7 +206,7 @@ int HAMLIB_API rig_set_dcs_code(RIG *rig, vfo_t vfo, tone_t code) if (caps->set_dcs_code == NULL) return -RIG_ENAVAIL; - if ((caps->targetable_vfo&RIG_TARGETABLE_TONE) || + if ((caps->targetable_vfo&RIG_TARGETABLE_TONE) || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) return caps->set_dcs_code(rig, vfo, code); @@ -229,10 +228,10 @@ int HAMLIB_API rig_set_dcs_code(RIG *rig, vfo_t vfo, tone_t code) * \param vfo The target VFO * \param code The location where to store the current tone * - * Retrieves the current encoding Digitally-Coded Squelch code. + * Retrieves the current encoding Digitally-Coded Squelch code. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_set_dcs_code(), rig_get_dcs_sql() @@ -251,7 +250,7 @@ int HAMLIB_API rig_get_dcs_code(RIG *rig, vfo_t vfo, tone_t *code) if (caps->get_dcs_code == NULL) return -RIG_ENAVAIL; - if ((caps->targetable_vfo&RIG_TARGETABLE_TONE) || + if ((caps->targetable_vfo&RIG_TARGETABLE_TONE) || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) return caps->get_dcs_code(rig, vfo, code); @@ -283,8 +282,8 @@ int HAMLIB_API rig_get_dcs_code(RIG *rig, vfo_t vfo, tone_t *code) * a call to rig_set_func() with arg RIG_FUNC_TSQL, unless it is * unavailable and the \a tone arg has to be set to 0. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_get_ctcss_sql(), rig_set_ctcss_tone() @@ -304,7 +303,7 @@ int HAMLIB_API rig_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone) if (caps->set_ctcss_sql == NULL) return -RIG_ENAVAIL; - if ((caps->targetable_vfo&RIG_TARGETABLE_TONE) || + if ((caps->targetable_vfo&RIG_TARGETABLE_TONE) || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) return caps->set_ctcss_sql(rig, vfo, tone); @@ -326,15 +325,15 @@ int HAMLIB_API rig_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone) * \param vfo The target VFO * \param tone The location where to store the current tone * - * Retrieves the current Continuous Tone Controlled Squelch System (CTCSS) + * Retrieves the current Continuous Tone Controlled Squelch System (CTCSS) * sub-audible *squelch* tone. * \note \a *tone is NOT in Hz, but in tenth of Hz! This way, * if the function rig_get_ctcss_sql() returns a subaudible tone of 885 - * for example, then the real tone is 88.5 Hz. + * for example, then the real tone is 88.5 Hz. * Also, a value of 0 for \a tone means the Tone squelch is disabled. * - * \return RIG_OK if the operation has been sucessful, otherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, otherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_set_ctcss_sql(), rig_get_ctcss_tone() @@ -420,10 +419,10 @@ int HAMLIB_API rig_set_dcs_sql(RIG *rig, vfo_t vfo, tone_t code) * \param vfo The target VFO * \param code The location where to store the current tone * - * Retrieves the current Digitally-Coded *Squelch* code. + * Retrieves the current Digitally-Coded *Squelch* code. * - * \return RIG_OK if the operation has been sucessful, ortherwise - * a negative value if an error occured (in which case, cause is + * \return RIG_OK if the operation has been sucessful, ortherwise + * a negative value if an error occured (in which case, cause is * set appropriately). * * \sa rig_set_dcs_sql(), rig_get_dcs_code() diff --git a/src/tones.h b/src/tones.h index e081338ee..943c6e6e1 100644 --- a/src/tones.h +++ b/src/tones.h @@ -2,21 +2,20 @@ * Hamlib Interface - CTCSS and DCS tables header * Copyright (c) 2000-2009 by Stephane Fillod and Frank Singleton * - * $Id: tones.h,v 1.6 2005-02-21 18:56:22 fillods 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 - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ @@ -46,7 +45,7 @@ static const tone_t static_full_ctcss_list[] = { * 50 CTCSS sub-audible tones, from 67.0Hz to 254.1Hz * * \note Don't even think about changing a bit of this array, several - * 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 */ #define COMMON_CTCSS_LIST \ @@ -100,7 +99,7 @@ static const tone_t static_full_dcs_list[] = { }; /* - * These arrays cannot be shared on Win32 systems, + * These arrays cannot be shared on Win32 systems, * because DLL's vars don't have constant address. */ #if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(IN_HAMLIB) diff --git a/src/usb_port.c b/src/usb_port.c index 249a48ef5..b949b821e 100644 --- a/src/usb_port.c +++ b/src/usb_port.c @@ -3,19 +3,20 @@ * Copyright (c) 2000-2011 by Stephane Fillod * * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * */ /** diff --git a/src/usb_port.h b/src/usb_port.h index d02c0dfaa..74a2aa279 100644 --- a/src/usb_port.h +++ b/src/usb_port.h @@ -2,21 +2,20 @@ * Hamlib Interface - USB communication header * Copyright (c) 2005 by Stephane Fillod * - * $Id: usb_port.h,v 1.1 2005-11-01 23:02:02 fillods 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 - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */