Initial release

git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@595 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.1.2
Stéphane Fillod, F8CFE 2001-07-21 12:55:04 +00:00
rodzic dde5cf9ee8
commit 21ef1c8b75
3 zmienionych plików z 145 dodań i 0 usunięć

24
doc/hamlib.cfg 100644
Wyświetl plik

@ -0,0 +1,24 @@
## $Id: hamlib.cfg,v 1.1 2001-07-21 12:50:35 f4cfe Exp $
PROJECT_NAME = "Hamlib"
# TODO: replace ../ by $(top_srcdir) et al.
# Output
OUTPUT_DIRECTORY= .
OUTPUT_LANGUAGE = English
GENERATE_HTML = YES
GENERATE_LATEX = NO
GENERATE_RTF = NO
GENERATE_MAN = YES
MAN_EXTENSION = .3
# Input
INPUT = ../src/rig.c
#../c++/rigclass.cc
INCLUDE_PATH = ../include
EXAMPLE_PATH = ../tests
QUIET = YES
JAVADOC_AUTOBRIEF = YES

87
src/conf.c 100644
Wyświetl plik

@ -0,0 +1,87 @@
/*
* Hamlib Interface - configuration interface
* Copyright (c) 2000,2001 by Stephane Fillod and Frank Singleton
*
* $Id: conf.c,v 1.1 2001-07-21 12:55:04 f4cfe 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 program 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.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h> /* Standard input/output definitions */
#include <string.h> /* String function definitions */
#include <unistd.h> /* UNIX standard function definitions */
#define HAMLIB_DLL
#include <hamlib/rig.h>
#include "conf.h"
#define TOK_EXAMPLE RIG_TOKEN_FRONTEND(1)
/*
* Place holder for now. Here will be defined all the configuration
* options available in the rig->state struct.
*/
static const struct confparams frontend_cfg_params[] = {
{ TOK_EXAMPLE, "example", "Example", "Frontend conf param example",
"0", RIG_CONF_NUMERIC, { n: { 0, 10, 1 } }
},
{ RIG_CONF_END, NULL, }
};
int frontend_set_conf(RIG *rig, token_t token, const char *val)
{
return -RIG_ENIMPL;
}
int frontend_get_conf(RIG *rig, token_t token, char *val)
{
return -RIG_ENIMPL;
}
/*
* lookup only in backend config table
* should use Lex to speed it up, strcmp hurts!
*/
const struct confparams *rig_confparam_lookup(RIG *rig, const char *name)
{
const struct confparams *cfp;
if (!rig || !rig->caps || !rig->caps->cfgparams)
return NULL;
for (cfp = rig->caps->cfgparams; cfp->name; cfp++)
if (!strcmp(cfp->name, name))
return cfp;
return NULL;
}
token_t rig_token_lookup(RIG *rig, const char *name)
{
const struct confparams *cfp;
cfp = rig_confparam_lookup(rig, name);
if (!cfp)
return RIG_CONF_END;
return cfp->token;
}

34
src/conf.h 100644
Wyświetl plik

@ -0,0 +1,34 @@
/*
* Hamlib Interface - configuration header
* Copyright (c) 2000,2001 by Stephane Fillod and Frank Singleton
*
* $Id: conf.h,v 1.1 2001-07-21 12:55:04 f4cfe 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 program 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.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#ifndef _CONF_H
#define _CONF_H 1
#include <hamlib/rig.h>
int frontend_set_conf(RIG *rig, token_t token, const char *val);
int frontend_get_conf(RIG *rig, token_t token, char *val);
#endif /* _CONF_H */