Commit 452cd09f authored by Christoph Berg's avatar Christoph Berg

Import Upstream version 0.9.30

parent 6b753e89
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for src 0.9.27.
# Generated by GNU Autoconf 2.59 for src 0.9.30.
#
# Report bugs to <rein@couperus.com>.
#
......@@ -269,8 +269,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='src'
PACKAGE_TARNAME='src'
PACKAGE_VERSION='0.9.27'
PACKAGE_STRING='src 0.9.27'
PACKAGE_VERSION='0.9.30'
PACKAGE_STRING='src 0.9.30'
PACKAGE_BUGREPORT='rein@couperus.com'
# Factoring default headers for most tests.
......@@ -779,7 +779,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures src 0.9.27 to adapt to many kinds of systems.
\`configure' configures src 0.9.30 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -845,7 +845,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of src 0.9.27:";;
short | recursive ) echo "Configuration of src 0.9.30:";;
esac
cat <<\_ACEOF
......@@ -964,7 +964,7 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
src configure 0.9.27
src configure 0.9.30
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
......@@ -978,7 +978,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by src $as_me 0.9.27, which was
It was created by src $as_me 0.9.30, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
......@@ -1621,7 +1621,7 @@ fi
# Define the identity of the package.
PACKAGE=tlf
VERSION=0.9.27
VERSION=0.9.30
cat >>confdefs.h <<_ACEOF
......@@ -5500,7 +5500,7 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
This file was extended by src $as_me 0.9.27, which was
This file was extended by src $as_me 0.9.30, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -5563,7 +5563,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
src config.status 0.9.27
src config.status 0.9.30
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
......
# Process this file with autoconf to produce a configure script.
AC_INIT(src, 0.9.27, rein@couperus.com)
AM_INIT_AUTOMAKE(tlf, 0.9.27)
AC_INIT(src, 0.9.30, rein@couperus.com)
AM_INIT_AUTOMAKE(tlf, 0.9.30)
AM_CONFIG_HEADER(config.h)
# Checks for programs.
......
tlf-0.9.30
==========
Bug fixes:
- exchange needed at least 1 character in dxped mode
RTTY miniterm changed to display line feeds (reading formatted texst is easier)
RTTY now sends linefeeds before and after the macro.
tlf-0.9.29
==========
Bug fixes:
- Date display error
- Spurious character error
- Malloc free error in socket.c
I also included Fabian's patch to searchlog.c for testing...I like it.
tlf-0.9.28
==========
Bug fixes (country indication did not work, wrong mults file for arrldx_dx).
Added interface to gMFSK to enable RTTY contesting.
Added new parameters for the logcfg.dat file:
GMFSK (use gMFSK as an output device)
RTTYMODE (start tlf in RTTY mode)
DIGIMODEM=/home/youruser/gmfsk_autofile
You need the special version of gMFSK which is used for pskmail (http://pskmail.wikispaces.com).
Information on how to install this hacked version of gMFSK-0.6 is on the pskmail wiki.
Tlf takes care of all contest related stuff, exactly as you are used to in CW mode...
Yyou can use keyboard mode (Alt-K in CW mode) by switching to the gMFSK send field
with "Alt-TAB". This toggles between tlf and gMFSK.
This will be necessary until I have time to redo the gMFSK interface (a socket interface is
on the todo list).
tlf-0.9.27
==========
Bug fixes (segfault at startup at some systems)
tlf-0.9.26
==========
Bug fix (segfault using the voice keyer).
......
......@@ -6,7 +6,7 @@ CONTEST=arrldx_dx
LOGFILE=arrltest.log
CONTEST_MODE
#
MULT_LIST=arrlsections
MULT_LIST=/usr/local/share/tlf/usa_canada_states
COUNTRYLIST=W,VE
USE_COUNTRYLIST_ONLY
COUNTRY_LIST_POINTS=3
......
......@@ -79,7 +79,7 @@ i = 1;
}
if (trxmode == DIGIMODE && keyerport == MFJ1278_KEYER)
if (trxmode == DIGIMODE && (keyerport == MFJ1278_KEYER || keyerport == GMFSK))
rx_rtty();
......
......@@ -120,9 +120,10 @@ printcall();
{
time_update();
if (trxmode == DIGIMODE && keyerport == MFJ1278_KEYER)
if (trxmode == DIGIMODE && (keyerport == GMFSK || keyerport == MFJ1278_KEYER)){
show_rtty();
printcall();
}
if (i == 0 || strlen(hiscall) == 0)
{
......@@ -132,8 +133,10 @@ printcall();
time_update();
if (trxmode == DIGIMODE && keyerport == MFJ1278_KEYER)
if (trxmode == DIGIMODE && (keyerport == GMFSK || keyerport == MFJ1278_KEYER)){
show_rtty();
printcall();
}
x = onechar();
......@@ -1256,8 +1259,11 @@ printcall();
time_update();
if (trxmode == DIGIMODE && keyerport == MFJ1278_KEYER)
if (trxmode == DIGIMODE && (keyerport == GMFSK || keyerport == MFJ1278_KEYER )) {
show_rtty();
mvprintw(12, 54, comment);
refresh();
}
}
......
......@@ -44,18 +44,28 @@ extern float node_frequencies[MAXNODES] ;
extern char thisnode;
extern int time_master;
extern int nroflines;
extern struct tm *time_ptr;
int f, j, k;
char inputbuffer[160] = "";
char time_buf[40] = "";
static int frcounter;
static int daysecs = 0;
attron(COLOR_PAIR(COLOR_CYAN) | A_STANDOUT);
strncpy(time_buf, timestr, 8) ;
mvaddstr(12, 0, band[bandinx]);
mvprintw(12, 17, time_buf);
if (daysecs > 60) { // update the date 1x per minute
daysecs = 0;
get_time();
strftime(time_buf, 60, "%d-%b-%y", time_ptr);
mvprintw(12, 7,time_buf);
} else {
daysecs++;
}
if (trx_control == 1) {
if (freq != 0.0) {
......
......@@ -28,6 +28,7 @@
#include "freq_display.h"
#include "lancode.h"
#include "cluster_bg.h"
#include "get_time.h"
void clusterinfo(char *timestr);
......@@ -88,8 +88,8 @@ int edit_last(void)
refresh();
} else {
// logview();
// j = 27;
logview();
j = 27;
}
}else if(j == 153) { // down
......
......@@ -28,7 +28,7 @@ int get_time(void)
{
extern struct tm *time_ptr;
extern int timeoffset;
extern int timecorr;
extern long timecorr;
time_t now;
......
......@@ -70,7 +70,9 @@ extern int itumult;
extern int pfxmult;
extern int exc_cont;
extern char continent[];
extern int keyerport;
extern int commentfield;
extern int dxped;
int i;
int x = 0;
......@@ -120,7 +122,7 @@ instring[1] = '\0';
mvprintw(12, 54, " ");
mvprintw(12, 54, comment);
commentfield = 1;
for (i=strlen(comment) ; i<=25; i++)
{
x = onechar();
......@@ -282,6 +284,7 @@ instring[1] = '\0';
if (ctcomp == 1) x = 92; // enter logs immediately
if (trxmode == SSBMODE) x = 92;
if (contest != 1) x = 92;
// if (dxped == 1) x = 92;
break;
}
......@@ -300,6 +303,10 @@ instring[1] = '\0';
instring[0] = x;
addch(x);
strcat(comment, instring);
if (keyerport == GMFSK){
show_rtty();
mvprintw(12, 54, comment);
}
refresh();
}
} else i--;
......@@ -310,7 +317,6 @@ instring[1] = '\0';
if (arrlss == 1) x = checkexchange(x);
if (cqww == 1) x = checkexchange(x);
if (x == '\n' || x == 9 || x == 11|| x == 92){
if ( (exchange_serial ==1)){ /* align serial nr. */
......@@ -417,7 +423,7 @@ instring[1] = '\0';
}
}
commentfield = 0;
return(x);
}
......@@ -426,7 +432,7 @@ instring[1] = '\0';
char cmpattern[]=" "; // global
char ssexchange[30] = "";
char section[4]="";
char section[8]="";
char callupdate[7];
int call_update = 0;
char zone_export[3] = " ";
......@@ -440,7 +446,7 @@ int checkexchange (int x) {
extern char mults_possible[MAX_MULTS][12] ;
extern int cqww;
extern int arrlss;
extern char section[4];
extern char section[];
extern char callupdate[];
extern char hiscall[];
extern int call_update;
......@@ -872,7 +878,6 @@ if ((serial_section_mult == 1) || (sectn_mult == 1) || dx_arrlsections == 1) {
strncpy (checksection, comment, 3);
checksection[3]='\0';
for (jj=0 ; jj < max_multipliers ; jj++) {
if ((strlen(mults_possible[jj] )>=1) && (strstr(checksection, mults_possible[jj]) != NULL)) {
......
......@@ -37,6 +37,7 @@
#include "writeparas.h"
#include "lancode.h"
#include "keyer.h"
#include "rtty.h"
int getexchange(void);
int checkexchange (int x);
......
......@@ -54,6 +54,7 @@ extern int itumult;
extern int qsonum;
extern int exchange_serial;
extern char tonestr[];
extern int dxped;
int callreturn = 0;
int qrg_out = 0;
......@@ -98,7 +99,7 @@ else
if (callreturn == '\n' && strlen(hiscall) >= 3 )
{
if (!strlen(comment) && contest == CONTEST && !ctcomp && defer_store)
if (!strlen(comment) && contest == CONTEST && !ctcomp && !dxped)
defer_store = 0;
if ((cqmode == CQ ) && (contest == CONTEST ) && (defer_store == 0)){ /* contest */
if (trxmode == CWMODE || trxmode == DIGIMODE)
......
......@@ -56,6 +56,7 @@
};
int debugflag = 0;
int editor = EDITOR_JOE;
char rttyoutput[120];
int use_vk = 0;
int tune_val = 0;
int use_bandoutput = 0;
......@@ -133,7 +134,9 @@
int ua9_cty;
char tlfversion[80] = "";
char multiplierlist[40]="";
char testbuffer[120] = "";
char multiplierlist[80]="";
char multsfile[80] = "";
char exchange_list[40] = "";
int timeoffset=0;
int multi = 0; /* 0 = SO , 1 = MOST, 2 = MM */
......@@ -224,6 +227,8 @@
int k_ptt;
char controllerport[80] = "/dev/ttyS0";
int miniterm = 0;
char modem_mode[8];
int commentfield = 0;
/*-------------------------------------packet-------------------------------*/
char spot_ptr[MAX_SPOTS][82];
......@@ -612,7 +617,7 @@ if (main_ie_list == NULL)
showmsg("Keyer is cwdaemon");
if (verbose == 1) sleep(1);
}
if (keyerport == MFJ1278_KEYER) {
if (keyerport == MFJ1278_KEYER || keyerport == GMFSK) {
init_controller();
}
......
......@@ -179,7 +179,7 @@ int parse_logcfg(char *inputbuffer){
extern int timeoffset;
extern int time_master;
extern int ctcomp;
extern char multiplierlist[40];
extern char multiplierlist[];
extern int multlist;
extern int universal;
extern int serial_section_mult;
......@@ -208,6 +208,7 @@ int parse_logcfg(char *inputbuffer){
extern int lowband_point_mult;
extern int sc_sidetone;
extern char sc_volume[];
extern char modem_mode[];
/* LZ3NY mods */
extern int mult_side;
......@@ -238,7 +239,7 @@ extern char clusterlogin[];
extern int cw_bandwidth;
extern int nobandchange;
extern int change_rst;
extern char rttyoutput[];
char commands[MAX_COMMANDS][30]= {
......@@ -392,8 +393,12 @@ extern int change_rst;
"CLUSTER_LOG",
"SERIAL+GRID4",
"CHANGE_RST",
"GMFSK=",
"RTTYMODE", /* 150 */
"DIGIMODEM=",
"",
"",
""
};
char teststring[80];
......@@ -810,7 +815,7 @@ extern int change_rst;
}
case 87 : {
multiplierlist[0] = '\0';
strcat(multiplierlist, inputbuffer + 10);
strncat(multiplierlist, inputbuffer + 10, 79);
multlist = 1;
universal = 1;
break;
......@@ -1181,6 +1186,24 @@ extern int change_rst;
change_rst = 1;
break;
}
case 149 : {
keyerport = GMFSK;
strncpy(controllerport, inputbuffer + 6, sizeof (controllerport) -1 );
controllerport[strlen(controllerport)-1] = '\0';
break;
}
case 150: { // start in digital mode
trxmode = DIGIMODE;
modem_mode[0] = '\0';
strcat(modem_mode, "RTTY");
break;
}
case 151 : {
rttyoutput[0] = '\0';
strncat(rttyoutput, inputbuffer + 10, 110);
rttyoutput[strlen(rttyoutput)-1] = '\0';
break;
}
}
......
......@@ -106,9 +106,9 @@
buffer[i] = '\0';
}
if (j < 4)
/* if (j < 4)
continue;
*/
j = 4;
while (strcmp(buffer+j , "") != 0)
......
......@@ -32,6 +32,7 @@
#include <unistd.h>
#include <fcntl.h>
#include "tlf.h"
#include "printcall.h"
static int fdcont; // global for this file: tty file descriptor
static char ry_term[4][50] = {"", "", "", "" };
......@@ -99,8 +100,15 @@ if (k > 40)
strcpy(bufferline, line);
for (j = 0; j < k; j++) {
if (bufferline[j] == 10 || bufferline[j] == 13|| bufferline[j]==7)
if (bufferline[j] == 10 || bufferline[j] == 13|| bufferline[j]==7) {
bufferline[j] = 32;
if (j < 40) {
strcat (bufferline, " ");
bufferline[39] = '\0';
j = 0;
k = 0;
}
}
}
......@@ -139,13 +147,17 @@ int show_rtty(void) {
extern int use_rxvt;
//extern char ry_term[][]; ### bug fix
extern int trxmode;
//extern char hiscall[];
extern int miniterm;
extern int commentfield;
extern char comment[];
if (trxmode != DIGIMODE)
if (trxmode != DIGIMODE || miniterm == 0)
return(-1);
attroff(A_STANDOUT);
if (use_rxvt == 0) attron(COLOR_PAIR(COLOR_YELLOW) | A_BOLD );
else attron(COLOR_PAIR(COLOR_YELLOW) );
if (use_rxvt == 0) attron(COLOR_PAIR(COLOR_GREEN) | A_BOLD );
else attron(COLOR_PAIR(COLOR_GREEN) );
mvprintw(1,0, " ");
mvprintw(1,0, ry_term[0]);
......@@ -157,6 +169,11 @@ if (trxmode != DIGIMODE)
mvprintw(4,0, ry_term[3]);
mvprintw(5,0, " ");
mvprintw(5,0, ry_term[4]);
if (commentfield == 0) {
printcall();
} else {
mvprintw(12,54, comment);
}
refresh();
attron(A_STANDOUT);
......@@ -169,6 +186,7 @@ int rx_rtty () {
extern char hiscall[];
extern int miniterm;
//extern char ry_term[][]; ### bug fix
int i = 0;
......@@ -189,10 +207,12 @@ if (fdcont > 0)
}
i = read (fdcont, line, 39);
//RX (2006-03-31 14:41Z): remove
if ( i > 0) {
line[i] = '\0';
if (i > 23)
strcpy(line, line + 24);
ry_addtext(line);
......
......@@ -25,8 +25,8 @@ extern char logfile[];
/* 10.09.2003 - LZ3NY */
int read_rules() {
char mit_contest_rule[45];
char contest_conf[50]=""; // contest_conf needs room for contest name... (PA0R)
char mit_contest_rule[80];
char contest_conf[80]=""; // contest_conf needs room for contest name... (PA0R)
char basic_contest_conf[75]= PACKAGE_DATA_DIR;
FILE *mit_contest_file;
......
......@@ -28,6 +28,16 @@
static char searchresult[MAX_CALLS][82];
static char result[MAX_CALLS][82];
/* DJ1YFK "worked window"-patch */
static char band_yfk[4]="";
static char testcall_yfk[13]="";
static char hiscall_yfk[13]=" ";
int xx=0;
int bm[6];
int bandnr;
int yy=0;
/* */
int searchlog(char *searchstring)
......@@ -150,6 +160,10 @@ char callmaster_location[80];
}
s_inputbuffer[0] = '\0';
//
// initialize array best matching callsigns
for(xx=0; xx<6; xx++) { bm[xx] = 0; }
for (r_index = 0; r_index < srch_index; r_index++){
strncpy (result[r_index], searchresult[r_index], 7);
......@@ -164,6 +178,67 @@ char callmaster_location[80];
strncat (result[r_index], searchresult[r_index]+52, 16);
}
/* DJ1YFK worked-window patch */
strncpy(band_yfk, searchresult[r_index],3);
band_yfk[4]= '\0';
bandnr = atoi(band_yfk);
strncpy(testcall_yfk, searchresult[r_index]+29,12);
testcall_yfk[13]= '\0';
// Create string with his call + whitespaces
strcpy(hiscall_yfk," ");
for (xx=0; xx < strlen(hiscall); xx++) {
hiscall_yfk[xx] = hiscall[xx];
}
// find out how many characters match
yy=0;
for (xx=0; xx < 13; xx++) {
if(hiscall_yfk[xx] == testcall_yfk[xx]) {yy++;}
}
// delete QSOs that match worse than anything before
// of course still less-good magtching QSOs can be in the array,
// but *before* the better matching one, so they will be
// overwritten later.
switch (bandnr) {
case 160: { if (yy < bm[0]) {
result[r_index][0] = '\0';
}
else { bm[0] = yy; }
break;
}
case 80: { if (yy < bm[1]) {
result[r_index][0] = '\0';
}
else { bm[1] = yy; }
break;
}
case 40: { if (yy < bm[2]) {
result[r_index][0] = '\0';
}
else { bm[2] = yy; }
break;
}
case 20: { if (yy < bm[3]) {
result[r_index][0] = '\0';
}
else { bm[3] = yy; }
break;
}
case 15: { if (yy < bm[4]) {
result[r_index][0] = '\0';
}
else { bm[4] = yy; }
break;
}
case 10: { if (yy < bm[5]) {
result[r_index][0] = '\0';
}
else { bm[5] = yy; }
}
} /* end of patch */
dupe = NODUPE;
isdupe=0; // LZ3NY auto-b4 patch
......@@ -821,12 +896,13 @@ else
return(count);
}
// -------------------------------------------------------------------------------
char multsfile[120] = ""; // global... (to be fixed)
//char multsfile[80] = ""; // global... (to be fixed)
// ----------------------------------------------load mults ------------------------
int load_multipliers(void) {
extern char mults_possible[MAX_MULTS][12];
extern char multiplierlist[];
extern char multsfile[];
FILE *cfp ;
char s_inputbuffer[186] = "";
......@@ -838,7 +914,7 @@ extern char multiplierlist[];
}
if (strlen(multiplierlist) != 0)
strncpy(multsfile , multiplierlist, strlen(multiplierlist)-1);
strncpy(multsfile , multiplierlist, strlen(multiplierlist) - 1);
else {
mvprintw(9,0, "No multiplier file specified, exiting.. !!\n");
refresh();
......
......@@ -137,7 +137,7 @@ if (strcmp(whichcontest, "arrldx_usa") == 0){
}
if (strcmp(whichcontest, "arrldx_dx") == 0){
other_flg = 1;
// other_flg = 1;
three_point = 1;
recall_mult = 1;
sectn_mult = 1;
......
/*
* Tlf - contest logging program for amateur radio operators
* Copyright (C) 2001-2002-2003 Rein Couperus <pa0rct@amsat.org>
* Copyright (C) 2001-2002-2003 Rein Couperus <address@hidden>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -78,6 +78,7 @@ void setlinemode(int s, int tf)
int close_s(int s)
{
FD_CLR(s, &openfds);
if ( 0 != sockbuf[s].buflen )
free(sockbuf[s].buf);
sockbuf[s].buflen = 0;
sockbuf[s].fragment = 0;
......
......@@ -73,6 +73,7 @@ static int m;
} else {
m++;
}
currentterm = miniterm;
miniterm = 0;
......
......@@ -46,6 +46,7 @@
#define MFJ1278_KEYER 4
#define ORION_KEYER 5
#define K2_KEYER 6
#define GMFSK 7
#define SINGLE 0 /* single op */
#define MULTI 1 /* multi op / single tx */
......@@ -113,7 +114,7 @@
#define MAX_SPOTS 200 /* max nr. of spots in spotarray */
#define MAX_CALLMASTER 40000 /* max number of calls in callmaster array */
#define MAX_COMMANDS 150
#define MAX_COMMANDS 155
#define EDITOR_JOE 0
#define EDITOR_VI 1
......
......@@ -34,12 +34,14 @@ extern char controllerport[];
extern int native_rig_fd;
extern char speedstr[];
extern int speed;
extern char rttyoutput[];
FILE *bfp = NULL;
int i;
char send_orion[3];
char buff[8];
int realspeed = 32;
char outstring[120] = "";
if (trxmode != CWMODE && trxmode != DIGIMODE)
return(1);
......@@ -87,6 +89,17 @@ if (data_ready == 1 ) {
fclose(bfp);
}
}else if (keyerport == GMFSK){
sprintf (outstring, "echo %c%c%s%c%c",'"','\n',wkeyerbuffer,'\n','"');
strcat (outstring, " >> ");
if (strlen(rttyoutput) < 2) {
mvprintw (24, 0, "No modem file specified!");
}