git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1989 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.2.5
Stéphane Fillod, F8CFE 2005-04-04 18:31:00 +00:00
rodzic 9346d0096a
commit 20f5e6fc3c
8 zmienionych plików z 1980 dodań i 1965 usunięć

Wyświetl plik

@ -3,13 +3,13 @@
* \ingroup rig * \ingroup rig
* \brief Rig configuration interface * \brief Rig configuration interface
* \author Stephane Fillod * \author Stephane Fillod
* \date 2000-2004 * \date 2000-2005
*/ */
/* /*
* Hamlib Interface - configuration interface * Hamlib Interface - configuration interface
* Copyright (c) 2000-2004 by Stephane Fillod * Copyright (c) 2000-2005 by Stephane Fillod
* *
* $Id: conf.c,v 1.12 2004-10-02 10:32:08 fillods Exp $ * $Id: conf.c,v 1.13 2005-04-04 18:30:47 fillods Exp $
* *
* This library is free software; you can redistribute it and/or modify * This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as * it under the terms of the GNU Library General Public License as
@ -344,9 +344,11 @@ int HAMLIB_API rig_token_foreach(RIG *rig, int (*cfunc)(const struct confparams
for (cfp = rig->caps->cfgparams; cfp && cfp->name; cfp++) for (cfp = rig->caps->cfgparams; cfp && cfp->name; cfp++)
if ((*cfunc)(cfp, data) == 0) if ((*cfunc)(cfp, data) == 0)
return RIG_OK; return RIG_OK;
for (cfp = frontend_cfg_params; cfp->name; cfp++) for (cfp = frontend_cfg_params; cfp->name; cfp++)
if ((*cfunc)(cfp, data) == 0) if ((*cfunc)(cfp, data) == 0)
return RIG_OK; return RIG_OK;
return RIG_OK; return RIG_OK;
} }
@ -366,12 +368,15 @@ const struct confparams * HAMLIB_API rig_confparam_lookup(RIG *rig, const char *
if (!rig || !rig->caps) if (!rig || !rig->caps)
return NULL; return NULL;
for (cfp = rig->caps->cfgparams; cfp && cfp->name; cfp++) for (cfp = rig->caps->cfgparams; cfp && cfp->name; cfp++)
if (!strcmp(cfp->name, name)) if (!strcmp(cfp->name, name))
return cfp; return cfp;
for (cfp = frontend_cfg_params; cfp->name; cfp++) for (cfp = frontend_cfg_params; cfp->name; cfp++)
if (!strcmp(cfp->name, name)) if (!strcmp(cfp->name, name))
return cfp; return cfp;
return NULL; return NULL;
} }

Wyświetl plik

@ -1,8 +1,8 @@
/* /*
* Hamlib Interface - toolbox * Hamlib Interface - toolbox
* Copyright (c) 2000-2004 by Stephane Fillod * Copyright (c) 2000-2005 by Stephane Fillod
* *
* $Id: misc.c,v 1.34 2004-10-02 10:32:08 fillods Exp $ * $Id: misc.c,v 1.35 2005-04-04 18:30:51 fillods Exp $
* *
* This library is free software; you can redistribute it and/or modify * This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as * it under the terms of the GNU Library General Public License as
@ -424,6 +424,7 @@ setting_t HAMLIB_API rig_parse_func(const char *s)
for (i=0 ; func_str[i].str != ""; i++) for (i=0 ; func_str[i].str != ""; i++)
if (!strcmp(s, func_str[i].str)) if (!strcmp(s, func_str[i].str))
return func_str[i].func; return func_str[i].func;
return RIG_FUNC_NONE; return RIG_FUNC_NONE;
} }
@ -484,6 +485,7 @@ setting_t HAMLIB_API rig_parse_level(const char *s)
for (i=0 ; level_str[i].str != ""; i++) for (i=0 ; level_str[i].str != ""; i++)
if (!strcmp(s, level_str[i].str)) if (!strcmp(s, level_str[i].str))
return level_str[i].level; return level_str[i].level;
return RIG_LEVEL_NONE; return RIG_LEVEL_NONE;
} }
@ -522,8 +524,9 @@ setting_t HAMLIB_API rig_parse_parm(const char *s)
for (i=0 ; parm_str[i].str != ""; i++) for (i=0 ; parm_str[i].str != ""; i++)
if (!strcmp(s, parm_str[i].str)) if (!strcmp(s, parm_str[i].str))
return parm_str[i].parm; return parm_str[i].parm;
return RIG_PARM_NONE; return RIG_PARM_NONE;
}
const char * HAMLIB_API rig_strparm(setting_t parm) const char * HAMLIB_API rig_strparm(setting_t parm)
{ {
@ -567,6 +570,7 @@ vfo_op_t HAMLIB_API rig_parse_vfo_op(const char *s)
for (i=0 ; vfo_op_str[i].str != ""; i++) for (i=0 ; vfo_op_str[i].str != ""; i++)
if (!strcmp(s, vfo_op_str[i].str)) if (!strcmp(s, vfo_op_str[i].str))
return vfo_op_str[i].vfo_op; return vfo_op_str[i].vfo_op;
return RIG_OP_NONE; return RIG_OP_NONE;
} }

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Interface - parallel communication low-level support * Hamlib Interface - parallel communication low-level support
* Copyright (c) 2000-2005 by Stephane Fillod * Copyright (c) 2000-2005 by Stephane Fillod
* *
* $Id: parallel.c,v 1.3 2005-04-03 12:27:16 fillods Exp $ * $Id: parallel.c,v 1.4 2005-04-04 18:30:55 fillods Exp $
* *
* This library is free software; you can redistribute it and/or modify * This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as * it under the terms of the GNU Library General Public License as
@ -340,6 +340,7 @@ int par_ptt_set(hamlib_port_t *p, ptt_t pttx)
p->type.ptt); p->type.ptt);
return -RIG_EINVAL; return -RIG_EINVAL;
} }
return RIG_OK; return RIG_OK;
} }
@ -364,6 +365,7 @@ int par_ptt_get(hamlib_port_t *p, ptt_t *pttx)
p->type.ptt); p->type.ptt);
return -RIG_ENAVAIL; return -RIG_ENAVAIL;
} }
return RIG_OK; return RIG_OK;
} }
@ -388,6 +390,7 @@ int par_dcd_get(hamlib_port_t *p, dcd_t *dcdx)
p->type.dcd); p->type.dcd);
return -RIG_ENAVAIL; return -RIG_ENAVAIL;
} }
return RIG_OK; return RIG_OK;
} }

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Interface - provides registering for dynamically loadable backends. * Hamlib Interface - provides registering for dynamically loadable backends.
* Copyright (c) 2000-2005 by Stephane Fillod * Copyright (c) 2000-2005 by Stephane Fillod
* *
* $Id: register.c,v 1.22 2005-04-03 12:27:16 fillods Exp $ * $Id: register.c,v 1.23 2005-04-04 18:30:56 fillods Exp $
* *
* This library is free software; you can redistribute it and/or modify * This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as * it under the terms of the GNU Library General Public License as
@ -123,6 +123,7 @@ const struct rig_caps * HAMLIB_API rig_get_caps(rig_model_t rig_model)
if (p->caps->rig_model == rig_model) if (p->caps->rig_model == rig_model)
return p->caps; return p->caps;
} }
return NULL; /* sorry, caps not registered! */ return NULL; /* sorry, caps not registered! */
} }
@ -140,6 +141,7 @@ static int rig_lookup_backend(rig_model_t rig_model)
rig_backend_list[i].be_num) rig_backend_list[i].be_num)
return i; return i;
} }
return -1; return -1;
} }
@ -168,8 +170,7 @@ int HAMLIB_API rig_check_backend(rig_model_t rig_model)
if (be_idx == -1) { if (be_idx == -1) {
rig_debug(RIG_DEBUG_VERBOSE, "rig_check_backend: unsupported " rig_debug(RIG_DEBUG_VERBOSE, "rig_check_backend: unsupported "
"backend %d for model %d\n", "backend %d for model %d\n",
RIG_BACKEND_NUM(rig_model), rig_model RIG_BACKEND_NUM(rig_model), rig_model);
);
return -RIG_ENAVAIL; return -RIG_ENAVAIL;
} }
@ -193,11 +194,13 @@ int HAMLIB_API rig_unregister(rig_model_t rig_model)
rig_hash_table[hval] = p->next; rig_hash_table[hval] = p->next;
else else
q->next = p->next; q->next = p->next;
free(p); free(p);
return RIG_OK; return RIG_OK;
} }
q = p; q = p;
} }
return -RIG_EINVAL; /* sorry, caps not registered! */ return -RIG_EINVAL; /* sorry, caps not registered! */
} }
@ -218,6 +221,7 @@ int HAMLIB_API rig_list_foreach(int (*cfunc)(const struct rig_caps*, rig_ptr_t),
if ((*cfunc)(p->caps,data) == 0) if ((*cfunc)(p->caps,data) == 0)
return RIG_OK; return RIG_OK;
} }
return RIG_OK; return RIG_OK;
} }
@ -271,6 +275,7 @@ int rig_load_all_backends()
for (i=0; i<RIG_BACKEND_MAX && rig_backend_list[i].be_name; i++) { for (i=0; i<RIG_BACKEND_MAX && rig_backend_list[i].be_name; i++) {
rig_load_backend(rig_backend_list[i].be_name); rig_load_backend(rig_backend_list[i].be_name);
} }
return RIG_OK; return RIG_OK;
} }

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Interface - main file * Hamlib Interface - main file
* Copyright (c) 2000-2005 by Stephane Fillod and Frank Singleton * Copyright (c) 2000-2005 by Stephane Fillod and Frank Singleton
* *
* $Id: rig.c,v 1.88 2005-04-03 22:33:08 fillods Exp $ * $Id: rig.c,v 1.89 2005-04-04 18:30:56 fillods Exp $
* *
* This library is free software; you can redistribute it and/or modify * This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as * it under the terms of the GNU Library General Public License as
@ -138,12 +138,14 @@ static const char *rigerror_table[] = {
static int add_opened_rig(RIG *rig) static int add_opened_rig(RIG *rig)
{ {
struct opened_rig_l *p; struct opened_rig_l *p;
p = (struct opened_rig_l *)malloc(sizeof(struct opened_rig_l)); p = (struct opened_rig_l *)malloc(sizeof(struct opened_rig_l));
if (!p) if (!p)
return -RIG_ENOMEM; return -RIG_ENOMEM;
p->rig = rig; p->rig = rig;
p->next = opened_rig_list; p->next = opened_rig_list;
opened_rig_list = p; opened_rig_list = p;
return RIG_OK; return RIG_OK;
} }

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Interface - rotator configuration interface * Hamlib Interface - rotator configuration interface
* Copyright (c) 2000-2004 by Stephane Fillod * Copyright (c) 2000-2004 by Stephane Fillod
* *
* $Id: rot_conf.c,v 1.4 2004-10-02 10:32:08 fillods Exp $ * $Id: rot_conf.c,v 1.5 2005-04-04 18:31:00 fillods Exp $
* *
* This library is free software; you can redistribute it and/or modify * This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as * it under the terms of the GNU Library General Public License as
@ -314,4 +314,3 @@ token_t HAMLIB_API rot_token_lookup(ROT *rot, const char *name)
return cfp->token; return cfp->token;
} }

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Interface - provides registering for dynamically loadable backends. * Hamlib Interface - provides registering for dynamically loadable backends.
* Copyright (c) 2000-2004 by Stephane Fillod * Copyright (c) 2000-2004 by Stephane Fillod
* *
* $Id: rot_reg.c,v 1.8 2005-04-03 12:27:17 fillods Exp $ * $Id: rot_reg.c,v 1.9 2005-04-04 18:31:00 fillods Exp $
* *
* This library is free software; you can redistribute it and/or modify * This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as * it under the terms of the GNU Library General Public License as
@ -168,8 +168,7 @@ int HAMLIB_API rot_check_backend(rot_model_t rot_model)
if (be_idx == -1) { if (be_idx == -1) {
rot_debug(RIG_DEBUG_VERBOSE, "rot_check_backend: unsupported " rot_debug(RIG_DEBUG_VERBOSE, "rot_check_backend: unsupported "
"backend %d for model %d\n", "backend %d for model %d\n",
ROT_BACKEND_NUM(rot_model), rot_model ROT_BACKEND_NUM(rot_model), rot_model);
);
return -RIG_ENAVAIL; return -RIG_ENAVAIL;
} }

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Interface - main file * Hamlib Interface - main file
* Copyright (c) 2000-2005 by Stephane Fillod and Frank Singleton * Copyright (c) 2000-2005 by Stephane Fillod and Frank Singleton
* *
* $Id: rotator.c,v 1.17 2005-02-20 02:38:29 fillods Exp $ * $Id: rotator.c,v 1.18 2005-04-04 18:31:00 fillods Exp $
* *
* This library is free software; you can redistribute it and/or modify * This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as * it under the terms of the GNU Library General Public License as
@ -684,5 +684,3 @@ const char* HAMLIB_API rot_get_info(ROT *rot)
return rot->caps->get_info(rot); return rot->caps->get_info(rot);
} }