Added info about `ldconfig' to INSTALL.

Removed unneeded variable in rigctl_parse.c as the prompt variable
already served the role needed to send the END command.


git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2287 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.2.7
Nate Bargmann, N0NB 2008-01-12 00:36:58 +00:00
rodzic 58984001d0
commit 6ff8d83364
4 zmienionych plików z 79 dodań i 44 usunięć

47
INSTALL
Wyświetl plik

@ -13,7 +13,7 @@ main directory and do the following:
1. Configure the source code by typing:
$ sh ./configure
$ ./configure
If you're planning to install the package into your home directory
or to a location other than `/usr/local' then add the flag
@ -21,7 +21,7 @@ main directory and do the following:
is `/home/username' you can configure the package to install itself
there by invoking:
$ sh ./configure --prefix=/home/username
$ ./configure --prefix=/home/username
N.B. If you know that you won't be using scripting languages (Perl,
Python, or TCL) and that you won't need static libaries (most
@ -35,15 +35,15 @@ main directory and do the following:
compilation :-) ). See also the "Hamlib specific Features" section
below for other `configure' options.
While running, `configure' prints some messages telling which
features is it checking for.
While running, `configure' prints some messages telling you which
features it is checking for.
2. Compile the package by typing:
$ make
Running `make' takes a while. If this is a very large package, now
is the time to go make some coffee.
Running `make' takes a while. Since Hamlib is a package, now is the
time to go get a cup of coffee.
3. Some packages are bundled with self-tests for source-code
verification. If this package includes such tests, you can
@ -53,6 +53,7 @@ main directory and do the following:
4. Type `make install' to install the programs and any data files and
documentation. Type `make uninstall' to undo the installation.
During installation, the following files go to the following directories:
Executables -> /prefix/bin
Libraries -> /prefix/lib
@ -81,18 +82,46 @@ main directory and do the following:
By prepending your home directory to the rest of the PATH you can
override systemwide installed software with your own custom installation.
5. You can remove the program binaries and object files from the
5. After installation you may need to update the ld.so.cache as the
installation files are placed in /usr/local/lib by default. On most
systems this is easily accomplished by running the `ldconfig' command
as the superuser (root). The following line may need to be added to
/etc/ld.so.conf:
/usr/local/lib
On Debian systems since at least 4.0 (Etch) and its derivatives (Ubuntu,
etc.), a file will need to be created in the /etc/ld.so.conf.d directory.
It doesn't seem to matter what you name it so long as it ends in .conf
and local.conf is a good choice. Place the following line in it:
/usr/local/lib
Now `ldconfig' can be run.
While the programs built along with Hamlib will probably work fine
without running `ldconfig', experience has shown that precompiled
binaries like Fldigi will not be able to find libhamlib.so.2 without
updating the ld.so.cache.
6. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'.
a different kind of computer), type `make distclean'. The
`configure' program will need to be run again to recompile Hamlib.
6. You can optionally generate the Doxygen documentation files:
7. You can optionally generate the Doxygen documentation files:
cd doc
make doc
The HTML output files are provided for binary releases on the hamlib.org
web site.
8. Finally, if you wish to remove Hamlib, run `make uninstall' as
superuser (root), unless Hamlib was installed into your home directory,
from the Hamlib source directory. This will work unless `make distclean'
has been run.
Compiler configuration
======================

Wyświetl plik

@ -5,7 +5,7 @@
* It takes commands in interactive mode as well as
* from command line options.
*
* $Id: rigctl.c,v 1.65 2008-01-10 03:42:35 n0nb Exp $
* $Id: rigctl.c,v 1.66 2008-01-12 00:36:58 n0nb Exp $
*
*
* This program is free software; you can redistribute it and/or
@ -82,9 +82,8 @@ static struct option long_options[] =
#define MAXCONFLEN 128
int interactive=1; /* if no cmd on command line, switch to interactive */
int prompt=1;
int dmode = 0; /* no Daemon mode for rigparse return string in rigctl */
int interactive = 1; /* if no cmd on command line, switch to interactive */
int prompt = 1; /* Print prompt in rigctl */
int main (int argc, char *argv[])
{

Wyświetl plik

@ -5,7 +5,7 @@
* It takes commands in interactive mode as well as
* from command line options.
*
* $Id: rigctl_parse.c,v 1.3 2008-01-10 03:42:35 n0nb Exp $
* $Id: rigctl_parse.c,v 1.4 2008-01-12 00:36:58 n0nb Exp $
*
*
* This program is free software; you can redistribute it and/or
@ -257,7 +257,6 @@ static int scanfc(FILE *fin, const char *format, void *p)
extern int interactive;
extern int prompt;
extern int dmode;
int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc)
@ -598,7 +597,7 @@ declare_proto_rig(get_freq)
fprintf(fout, "%s: ", cmd->arg1); /* i.e. "Frequency" */
fprintf(fout, "%"PRIll"\n", (long long)freq);
if (interactive && dmode) /* only for rigctld */
if (interactive && !prompt) /* only for rigctld */
fprintf(fout, "END\n");
return status;
@ -626,8 +625,8 @@ declare_proto_rig(get_rit)
fprintf(fout, "%s: ", cmd->arg1);
fprintf(fout, "%ld\n", rit);
if (interactive && dmode) /* only for rigctld */
printf(fout, "END\n");
if (interactive && !prompt) /* only for rigctld */
fprintf(fout, "END\n");
return status;
}
@ -654,7 +653,7 @@ declare_proto_rig(get_xit)
fprintf(fout, "%s: ", cmd->arg1);
fprintf(fout, "%ld\n", xit);
if (interactive && dmode) /* only for rigctld */
if (interactive && !prompt) /* only for rigctld */
fprintf(fout, "END\n");
return status;
@ -688,7 +687,7 @@ declare_proto_rig(get_mode)
fprintf(fout, "%s: ", cmd->arg2);
fprintf(fout, "%ld\n", width);
if (interactive && dmode) /* only for rigctld */
if (interactive && !prompt) /* only for rigctld */
fprintf(fout, "END\n");
return status;
@ -712,7 +711,7 @@ declare_proto_rig(get_vfo)
fprintf(fout, "%s: ", cmd->arg1);
fprintf(fout, "%s\n", rig_strvfo(vfo));
if (interactive && dmode) /* only for rigctld */
if (interactive && !prompt) /* only for rigctld */
fprintf(fout, "END\n");
return status;
@ -740,7 +739,7 @@ declare_proto_rig(get_ptt)
fprintf(fout, "%s: ", cmd->arg1);
fprintf(fout, "%d\n", ptt);
if (interactive && dmode) /* only for rigctld */
if (interactive && !prompt) /* only for rigctld */
fprintf(fout, "END\n");
return status;
@ -768,7 +767,7 @@ declare_proto_rig(get_rptr_shift)
fprintf(fout, "%s: ", cmd->arg1);
fprintf(fout, "%s\n", rig_strptrshift(rptr_shift));
if (interactive && dmode) /* only for rigctld */
if (interactive && !prompt) /* only for rigctld */
fprintf(fout, "END\n");
return status;
@ -796,7 +795,7 @@ declare_proto_rig(get_rptr_offs)
fprintf(fout, "%s: ", cmd->arg1);
fprintf(fout, "%ld\n", rptr_offs);
if (interactive && dmode) /* only for rigctld */
if (interactive && !prompt) /* only for rigctld */
fprintf(fout, "END\n");
return status;
@ -824,7 +823,7 @@ declare_proto_rig(get_ctcss_tone)
fprintf(fout, "%s: ", cmd->arg1);
fprintf(fout, "%d\n", tone);
if (interactive && dmode) /* only for rigctld */
if (interactive && !prompt) /* only for rigctld */
fprintf(fout, "END\n");
return status;
@ -852,7 +851,7 @@ declare_proto_rig(get_dcs_code)
fprintf(fout, "%s: ", cmd->arg1);
fprintf(fout, "%d\n", code);
if (interactive && dmode) /* only for rigctld */
if (interactive && !prompt) /* only for rigctld */
fprintf(fout, "END\n");
return status;
@ -880,7 +879,7 @@ declare_proto_rig(get_split_freq)
fprintf(fout, "%s: ", cmd->arg1);
fprintf(fout, "%"PRIll"\n", (long long)txfreq);
if (interactive && dmode) /* only for rigctld */
if (interactive && !prompt) /* only for rigctld */
fprintf(fout, "END\n");
return status;
@ -914,7 +913,7 @@ declare_proto_rig(get_split_mode)
fprintf(fout, "%s: ", cmd->arg2);
fprintf(fout, "%ld\n", width);
if (interactive && dmode) /* only for rigctld */
if (interactive && !prompt) /* only for rigctld */
fprintf(fout, "END\n");
return status;
@ -946,7 +945,7 @@ declare_proto_rig(get_split_vfo)
fprintf(fout, "%s: ", cmd->arg2);
fprintf(fout, "%s\n", rig_strvfo(tx_vfo));
if (interactive && dmode) /* only for rigctld */
if (interactive && !prompt) /* only for rigctld */
fprintf(fout, "END\n");
return status;
@ -974,13 +973,14 @@ declare_proto_rig(get_ts)
fprintf(fout, "%s: ", cmd->arg1);
fprintf(fout, "%ld\n", ts);
if (interactive && dmode) /* only for rigctld */
if (interactive && !prompt) /* only for rigctld */
fprintf(fout, "END\n");
return status;
}
/* '2' */
/* FIXME: For rigctld */
declare_proto_rig(power2mW)
{
int status;
@ -997,6 +997,10 @@ declare_proto_rig(power2mW)
scanf("%d", &mode);
status = rig_power2mW(rig, &mwp, power, freq, (rmode_t) mode);
fprintf(fout, "Power: %d mW\n", mwp);
if (interactive && !prompt) /* only for rigctld */
fprintf(fout, "END\n");
return status;
}
@ -1096,7 +1100,7 @@ declare_proto_rig(get_level)
else
fprintf(fout, "%d\n", val.i);
if (interactive && dmode) /* only for rigctld */
if (interactive && !prompt) /* only for rigctld */
fprintf(fout, "END\n");
return status;
@ -1128,7 +1132,7 @@ declare_proto_rig(get_func)
fprintf(fout, "%s: ", cmd->arg2);
fprintf(fout, "%d\n", func_stat);
if (interactive && dmode) /* only for rigctld */
if (interactive && !prompt) /* only for rigctld */
fprintf(fout, "END\n");
return status;
@ -1223,7 +1227,7 @@ declare_proto_rig(get_parm)
else
fprintf(fout, "%d\n", val.i);
if (interactive && dmode) /* only for rigctld */
if (interactive && !prompt) /* only for rigctld */
fprintf(fout, "END\n");
return status;
@ -1259,6 +1263,10 @@ declare_proto_rig(get_mem)
if (interactive && prompt)
fprintf(fout, "%s: ", cmd->arg1);
fprintf(fout, "%d\n", ch);
if (interactive && !prompt) /* only for rigctld */
fprintf(fout, "END\n");
return status;
}
@ -1405,7 +1413,7 @@ declare_proto_rig(get_channel)
return status;
dump_chan(fout, rig, &chan);
if (interactive && dmode) /* only for rigctld */
if (interactive && !prompt) /* only for rigctld */
fprintf(fout, "END\n");
return status;
@ -1480,7 +1488,7 @@ declare_proto_rig(get_trn)
fprintf(fout, "%s: ", cmd->arg1);
fprintf(fout, "%d\n", trn);
if (interactive && dmode) /* only for rigctld */
if (interactive && !prompt) /* only for rigctld */
fprintf(fout, "END\n");
return status;
@ -1496,7 +1504,7 @@ declare_proto_rig(get_info)
fprintf(fout, "%s: ", cmd->arg1);
fprintf(fout, "%s\n", s ? s : "None");
if (interactive && dmode) /* only for rigctld */
if (interactive && !prompt) /* only for rigctld */
fprintf(fout, "END\n");
return RIG_OK;
@ -1572,7 +1580,7 @@ declare_proto_rig(dump_caps)
{
dumpcaps(rig, fout);
if (interactive && dmode) /* only for rigctld */
if (interactive && !prompt) /* only for rigctld */
fprintf(fout, "END\n");
return RIG_OK;
@ -1600,7 +1608,7 @@ declare_proto_rig(get_ant)
fprintf(fout, "%s: ", cmd->arg1);
fprintf(fout, "%d\n", rig_setting2idx(ant));
if (interactive && dmode) /* only for rigctld */
if (interactive && !prompt) /* only for rigctld */
fprintf(fout, "END\n");
return status;
@ -1643,7 +1651,7 @@ declare_proto_rig(get_powerstat)
fprintf(fout, "%s: ", cmd->arg1);
fprintf(fout, "%d\n", stat);
if (interactive && dmode) /* only for rigctld */
if (interactive && !prompt) /* only for rigctld */
fprintf(fout, "END\n");
return status;
@ -1720,7 +1728,7 @@ declare_proto_rig(send_cmd)
if (retval > 0 || retval == -RIG_ETIMEOUT)
retval = RIG_OK;
if (interactive && dmode) /* only for rigctld */
if (interactive && !prompt) /* only for rigctld */
fprintf(fout, "END\n");
return retval;

Wyświetl plik

@ -4,7 +4,7 @@
* This program test/control a radio using Hamlib.
* It takes commands from network connection.
*
* $Id: rigctld.c,v 1.3 2008-01-10 03:42:35 n0nb Exp $
* $Id: rigctld.c,v 1.4 2008-01-12 00:36:58 n0nb Exp $
*
*
* This program is free software; you can redistribute it and/or
@ -90,9 +90,8 @@ struct handle_data {
void * handle_socket(void * arg);
void usage(void);
int interactive=1; /* no cmd because of daemon */
int prompt=0;
int dmode = 1; /* Daemon mode for rigparse return string */
int interactive = 1; /* no cmd because of daemon */
int prompt= 0 ; /* Daemon mode for rigparse return string */
int portno = 4532;