fix error code return convention, which is negative when failed

git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2004 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.2.5
Stéphane Fillod, F8CFE 2005-04-10 21:49:38 +00:00
rodzic 74c6d2ba61
commit 6ba9819f5d
7 zmienionych plików z 15 dodań i 15 usunięć

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib TenTenc backend - TT-565 description
* Copyright (c) 2004-2005 by Stephane Fillod & Martin Ewing
*
* $Id: orion.c,v 1.11 2005-04-05 13:52:42 aa6e Exp $
* $Id: orion.c,v 1.12 2005-04-10 21:49: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
@ -346,7 +346,7 @@ int tt565_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, int *d
*data_len, itry, ft2-ft1);
#endif
}
return RIG_ETIMEOUT;
return -RIG_ETIMEOUT;
}
/*************************************************************************************

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Watkins-Johnson backend - main file
* Copyright (c) 2004 by Stephane Fillod
*
* $Id: wj.c,v 1.1 2004-09-12 21:29:10 fillods Exp $
* $Id: wj.c,v 1.2 2005-04-10 21:49: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
@ -164,7 +164,7 @@ static int wj_transaction(RIG *rig, int monitor)
*/
retval = read_block(&rig->state.rigport, rxbuf, CMDSZ);
if (retval < 0 || retval > CMDSZ)
return RIG_ERJCTED;
return -RIG_ERJCTED;
/*
* TODO: analyze back the reply, and fill in the priv struct

Wyświetl plik

@ -13,7 +13,7 @@
* The starting point for this code was Frank's ft847 implementation.
*
*
* $Id: ft857.c,v 1.7 2005-01-25 00:21:58 fillods Exp $
* $Id: ft857.c,v 1.8 2005-04-10 21:49:38 fillods Exp $
*
*
* This library is free software; you can redistribute it and/or
@ -391,7 +391,7 @@ static int ft857_get_status(RIG *rig, int status)
break;
default:
rig_debug(RIG_DEBUG_ERR, "ft857_get_status: Internal error!\n");
return RIG_EINTERNAL;
return -RIG_EINTERNAL;
}
serial_flush(&rig->state.rigport);

Wyświetl plik

@ -9,7 +9,7 @@
* via serial interface to an FT-890 using the "CAT" interface
*
*
* $Id: ft890.c,v 1.8 2005-04-03 18:57:28 fillods Exp $
* $Id: ft890.c,v 1.9 2005-04-10 21:49:38 fillods Exp $
*
*
* This library is free software; you can redistribute it and/or
@ -1178,7 +1178,7 @@ static int ft890_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit) {
length = FT890_VFO_DATA_LENGTH;
break;
default:
return RIG_EINVAL;
return -RIG_EINVAL;
}
rig_debug(RIG_DEBUG_TRACE, "%s: set cmd_index = %i\n", __func__, cmd_index);
rig_debug(RIG_DEBUG_TRACE, "%s: set offset = 0x%02x\n", __func__, offset);

Wyświetl plik

@ -11,7 +11,7 @@
* The starting point for this code was Frank's ft847 implementation.
*
*
* $Id: ft897.c,v 1.5 2005-03-26 13:03:26 fillods Exp $
* $Id: ft897.c,v 1.6 2005-04-10 21:49:38 fillods Exp $
*
*
* This library is free software; you can redistribute it and/or
@ -425,7 +425,7 @@ static int ft897_get_status(RIG *rig, int status)
break;
default:
rig_debug(RIG_DEBUG_ERR, "ft897_get_status: Internal error!\n");
return RIG_EINTERNAL;
return -RIG_EINTERNAL;
}
serial_flush(&rig->state.rigport);

Wyświetl plik

@ -9,7 +9,7 @@
* via serial interface to an FT-900 using the "CAT" interface
*
*
* $Id: ft900.c,v 1.3 2005-04-03 18:57:28 fillods Exp $
* $Id: ft900.c,v 1.4 2005-04-10 21:49:38 fillods Exp $
*
*
* This library is free software; you can redistribute it and/or
@ -1177,7 +1177,7 @@ static int ft900_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit) {
length = FT900_VFO_DATA_LENGTH;
break;
default:
return RIG_EINVAL;
return -RIG_EINVAL;
}
rig_debug(RIG_DEBUG_TRACE, "%s: set cmd_index = %i\n", __func__, cmd_index);
rig_debug(RIG_DEBUG_TRACE, "%s: set offset = 0x%02x\n", __func__, offset);

Wyświetl plik

@ -12,7 +12,7 @@
* pages 86 to 90
*
*
* $Id: ft920.c,v 1.18 2005-01-25 00:21:58 fillods Exp $
* $Id: ft920.c,v 1.19 2005-04-10 21:49:38 fillods Exp $
*
*
* This library is free software; you can redistribute it and/or
@ -992,7 +992,7 @@ static int ft920_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vf
*split = RIG_SPLIT_OFF;
break;
default:
return RIG_EINVAL;
return -RIG_EINVAL;
}
return RIG_OK;
@ -1191,7 +1191,7 @@ static int ft920_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit) {
offset = FT920_SUMO_VFO_B_CLAR;
break;
default:
return RIG_EINVAL;
return -RIG_EINVAL;
}
rig_debug(RIG_DEBUG_TRACE, "%s: set cmd_index = %i\n", __func__, cmd_index);
rig_debug(RIG_DEBUG_TRACE, "%s: set offset = 0x%02x\n", __func__, offset);