kopia lustrzana https://github.com/jamescoxon/dl-fldigi
Upstream version 3.03AJ
rodzic
eab55d5217
commit
91eac1e155
|
|
@ -27,6 +27,7 @@ Change Log:
|
|||
value for the macro buttons.
|
||||
14) Fixed macro timer to properly reset if <TIMER> re-invoked during
|
||||
timeout period.
|
||||
15) Fixed broken access to on-line subscriber Hamlog data base
|
||||
|
||||
3.02
|
||||
1) Added hamlib interface for rig control
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ dnl major and minor must be integers; patch may
|
|||
dnl contain other characters or be empty
|
||||
m4_define(FLDIGI_MAJOR, [3])
|
||||
m4_define(FLDIGI_MINOR, [0])
|
||||
m4_define(FLDIGI_PATCH, [3AI])
|
||||
m4_define(FLDIGI_PATCH, [3AJ])
|
||||
|
||||
AC_INIT([fldigi], FLDIGI_MAJOR.FLDIGI_MINOR[FLDIGI_PATCH], [w1hkj AT w1hkj DOT com])
|
||||
|
||||
|
|
|
|||
|
|
@ -17,20 +17,21 @@ else
|
|||
hamlib_dir=/usr/lib
|
||||
fi
|
||||
fi
|
||||
hamlib_libs="$hamlib_dir/hamlib-*.a"
|
||||
|
||||
case "$target_os" in
|
||||
*linux*)
|
||||
AM_LDFLAGS="$AM_LDFLAGS -Wl,--whole-archive $hamlib_dir/hamlib-*.a -Wl,--no-whole-archive"
|
||||
AM_LDFLAGS="$AM_LDFLAGS -Wl,--export-dynamic -Wl,--whole-archive $hamlib_libs -Wl,--no-whole-archive"
|
||||
;;
|
||||
*darwin*)
|
||||
# Apple's ld isn't quite up to this task: there is no way to specify -all_load for
|
||||
# only a subset of the libraries that we must link with. For this reason we resort
|
||||
# to using the "dangerous" -m flag, which turns "multiply defined symbol" errors
|
||||
# into warnings. This will probably not work for ppc64 and x86_64 universal binaries.
|
||||
AM_LDFLAGS="$AM_LDFLAGS -Wl,-all_load -Wl,-m $hamlib_dir/hamlib-*.a"
|
||||
AM_LDFLAGS="$AM_LDFLAGS -Wl,-all_load -Wl,-m $hamlib_libs"
|
||||
;;
|
||||
*cygwin*)
|
||||
AM_LDFLAGS="$AM_LDFLAGS -Wl,--export-all-symbols -Wl,--whole-archive $hamlib_dir/hamlib-*.a -Wl,--no-whole-archive"
|
||||
AM_LDFLAGS="$AM_LDFLAGS -Wl,--export-all-symbols -Wl,--whole-archive $hamlib_libs -Wl,--no-whole-archive"
|
||||
;;
|
||||
*)
|
||||
echo "E: This script does not support $target_os" >&2
|
||||
|
|
|
|||
|
|
@ -93,10 +93,10 @@ endif
|
|||
if DARWIN
|
||||
appbundle: fldigi
|
||||
sh $(srcdir)/../scripts/mkappbundle.sh "$(srcdir)/../data" . \
|
||||
$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-bundle-nolibs \
|
||||
$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-bundle
|
||||
CLEAN_LOCAL_FILES += $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-bundle-nolibs \
|
||||
$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-bundle \
|
||||
$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-nolibs \
|
||||
$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
|
||||
CLEAN_LOCAL_FILES += $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-nolibs \
|
||||
$(PACKAGE_TARNAME)-$(PACKAGE_VERSION) \
|
||||
$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)*.dmg
|
||||
endif
|
||||
|
||||
|
|
|
|||
|
|
@ -30,10 +30,6 @@
|
|||
# include <sys/msg.h>
|
||||
#endif
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
# include <w32api/windows.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string>
|
||||
|
||||
|
|
@ -498,12 +494,6 @@ void cb_E(Fl_Menu_*, void*) {
|
|||
|
||||
void cb_wMain(Fl_Widget*, void*)
|
||||
{
|
||||
if (Fl::event_key(FL_Escape)) {
|
||||
TransmitText->clear();
|
||||
active_modem->set_stopflag(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!clean_exit())
|
||||
return;
|
||||
// hide all shown windows
|
||||
|
|
@ -866,38 +856,7 @@ void cb_mnuAbout(Fl_Widget*, void*)
|
|||
|
||||
void cb_mnuVisitURL(Fl_Widget*, void* arg)
|
||||
{
|
||||
const char* url = reinterpret_cast<const char *>(arg);
|
||||
#ifndef __CYGWIN__
|
||||
# ifdef __APPLE__
|
||||
const char* browsers[] = { "open" };
|
||||
# else
|
||||
const char* browsers[] = { "xdg-open", getenv("BROWSER"), "sensible-brower",
|
||||
"firefox", "mozilla" };
|
||||
# endif
|
||||
switch (fork()) {
|
||||
case 0:
|
||||
for (size_t i = 0; i < sizeof(browsers)/sizeof(browsers[0]); i++)
|
||||
if (browsers[i])
|
||||
execlp(browsers[i], browsers[i], url, (char*)0);
|
||||
LOG_PERROR("Could not execute a web browser");
|
||||
exit(EXIT_FAILURE);
|
||||
case -1:
|
||||
fl_alert("Could not run a web browser:\n%s\n\n"
|
||||
"Open this URL manually:\n%s",
|
||||
strerror(errno), url);
|
||||
}
|
||||
#else
|
||||
// gurgle... gurgle... HOWL
|
||||
// "The return value is cast as an HINSTANCE for backward
|
||||
// compatibility with 16-bit Windows applications. It is
|
||||
// not a true HINSTANCE, however. The only thing that can
|
||||
// be done with the returned HINSTANCE is to cast it to an
|
||||
// int and compare it with the value 32 or one of the error
|
||||
// codes below." (Error codes omitted to preserve sanity).
|
||||
if ((int)ShellExecute(NULL, "open", url, NULL, NULL, SW_SHOWNORMAL) <= 32)
|
||||
fl_alert("Could not open url:\n%s\n", url);
|
||||
#endif
|
||||
|
||||
fl_open_uri(reinterpret_cast<const char *>(arg));
|
||||
restoreFocus();
|
||||
}
|
||||
|
||||
|
|
@ -919,11 +878,8 @@ void cb_mnuBeginnersURL(Fl_Widget*, void*)
|
|||
return;
|
||||
f << szBeginner;
|
||||
f.close();
|
||||
#ifndef __CYGWIN__
|
||||
|
||||
cb_mnuVisitURL(NULL, (void *)deffname.insert(0, "file://").c_str());
|
||||
#else
|
||||
cb_mnuVisitURL(NULL, (void *)deffname.c_str());
|
||||
#endif
|
||||
}
|
||||
|
||||
void cb_mnuAboutURL(Fl_Widget*, void*)
|
||||
|
|
@ -1044,7 +1000,7 @@ void cb_mnuAudioInfo(Fl_Widget*, void*)
|
|||
|
||||
void cb_ShowConfig(Fl_Widget*, void*)
|
||||
{
|
||||
cb_mnuVisitURL(0, (void*)HomeDir.c_str());
|
||||
cb_mnuVisitURL(0, (void*)string("file://").append(HomeDir).c_str());
|
||||
}
|
||||
|
||||
void cbTune(Fl_Widget *w, void *) {
|
||||
|
|
@ -1283,6 +1239,23 @@ void cb_XmtMixer(Fl_Widget *w, void *d)
|
|||
mixer->setXmtLevel(progStatus.XmtMixer);
|
||||
}
|
||||
|
||||
int default_handler(int event)
|
||||
{
|
||||
if (event != FL_SHORTCUT)
|
||||
return 0;
|
||||
|
||||
Fl_Widget* w = Fl::focus();
|
||||
if (w == fl_digi_main || w->window() == fl_digi_main) {
|
||||
int key = Fl::event_key();
|
||||
if (key == FL_Escape || (key >= FL_F && key <= FL_F_Last)) {
|
||||
TransmitText->take_focus();
|
||||
TransmitText->handle(FL_KEYBOARD);
|
||||
w->take_focus(); // remove this to leave tx text focused
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// XPM Calendar Label
|
||||
static const char *cal_16[] = {
|
||||
|
|
@ -1788,7 +1761,8 @@ void create_fl_digi_main() {
|
|||
TiledGroup->end();
|
||||
Fl_Group::current()->resizable(TiledGroup);
|
||||
|
||||
|
||||
Fl::add_handler(default_handler);
|
||||
|
||||
Fl_Box *bx;
|
||||
Fl_Box *macroFrame = new Fl_Box(0, Y, WNOM, Hmacros);
|
||||
macroFrame->box(FL_ENGRAVED_FRAME);
|
||||
|
|
@ -2073,12 +2047,7 @@ void put_rx_char(unsigned int data)
|
|||
static unsigned int last = 0;
|
||||
const char **asc = ascii;
|
||||
|
||||
#ifndef __CYGWIN__
|
||||
rxmsgid = msgget( (key_t) progdefaults.rx_msgid, 0666);
|
||||
if (mailclient || mailserver || txmsgid != -1 || arqmode)
|
||||
#else
|
||||
if (mailclient || mailserver || arqmode)
|
||||
#endif
|
||||
asc = ascii2;
|
||||
if (active_modem->get_mode() == MODE_RTTY ||
|
||||
active_modem->get_mode() == MODE_CW)
|
||||
|
|
@ -2511,7 +2480,7 @@ void start_tx()
|
|||
{
|
||||
if (progdefaults.rsid == true) return;
|
||||
trx_transmit();
|
||||
wf->set_XmtRcvBtn(true);
|
||||
REQ(&waterfall::set_XmtRcvBtn, wf, true);
|
||||
}
|
||||
|
||||
void abort_tx()
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@ extern void arq_init();
|
|||
extern void arq_close();
|
||||
extern void WriteARQ(unsigned int);
|
||||
|
||||
#define ARQBUFSIZ 8192
|
||||
|
||||
struct RXMSGSTRUC {
|
||||
long int msg_type;
|
||||
char c;
|
||||
|
|
@ -54,7 +56,7 @@ struct RXMSGSTRUC {
|
|||
|
||||
struct TXMSGSTRUC {
|
||||
long int msg_type;
|
||||
char buffer[BUFSIZ];
|
||||
char buffer[ARQBUFSIZ];
|
||||
};
|
||||
|
||||
extern RXMSGSTRUC rxmsgst;
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
#include "threads.h"
|
||||
#include "socket.h"
|
||||
#include "debug.h"
|
||||
#include "debug.h"
|
||||
|
||||
#include <FL/Fl.H>
|
||||
#include <FL/fl_ask.H>
|
||||
|
|
@ -58,11 +58,11 @@ bool arq_text_available = false;
|
|||
|
||||
extern void send0x06();
|
||||
|
||||
static void popup_msg(void* msg)
|
||||
{
|
||||
fl_message((const char*)msg);
|
||||
}
|
||||
|
||||
static void popup_msg(void* msg)
|
||||
{
|
||||
fl_message((const char*)msg);
|
||||
}
|
||||
|
||||
void ParseMode(string src)
|
||||
{
|
||||
if (src.find("PTTTUNE") != string::npos) {
|
||||
|
|
@ -144,7 +144,7 @@ bool bSend0x06 = false;
|
|||
|
||||
void process_msgque()
|
||||
{
|
||||
int nbytes = msgrcv (txmsgid, (void *)&txmsgst, BUFSIZ, 0, IPC_NOWAIT);
|
||||
int nbytes = msgrcv (txmsgid, (void *)&txmsgst, ARQBUFSIZ, 0, IPC_NOWAIT);
|
||||
if (nbytes > 0) {
|
||||
arqtext = txmsgst.buffer;
|
||||
parse_arqtext();
|
||||
|
|
@ -203,7 +203,7 @@ bool Gmfsk_arqRx()
|
|||
FL_AWAKE();
|
||||
time(&prog_time);
|
||||
if (prog_time - start_time > TIMEOUT) {
|
||||
LOG_ERROR("pskmail_out failure");
|
||||
LOG_ERROR("pskmail_out failure");
|
||||
autofile.close();
|
||||
std::remove (sAutoFile.c_str());
|
||||
return false;
|
||||
|
|
@ -245,15 +245,15 @@ bool Gmfsk_arqRx()
|
|||
extern void arq_run(Socket s);
|
||||
extern void arq_stop();
|
||||
|
||||
string errstring;
|
||||
string txstring;
|
||||
string cmdstring;
|
||||
string errstring;
|
||||
string txstring;
|
||||
string cmdstring;
|
||||
string response;
|
||||
bool isTxChar = false;
|
||||
bool isCmdChar = false;
|
||||
bool processCmd = false;
|
||||
|
||||
static Fl_Thread* arq_socket_thread = 0;
|
||||
static Fl_Thread* arq_socket_thread = 0;
|
||||
ARQ_SOCKET_Server* ARQ_SOCKET_Server::inst = 0;
|
||||
|
||||
Socket arqclient;
|
||||
|
|
@ -269,11 +269,11 @@ ARQ_SOCKET_Server::ARQ_SOCKET_Server()
|
|||
ARQ_SOCKET_Server::~ARQ_SOCKET_Server()
|
||||
{
|
||||
run = false;
|
||||
if (arq_socket_thread) {
|
||||
if (arq_socket_thread) {
|
||||
pthread_join(*arq_socket_thread, NULL);
|
||||
delete arq_socket_thread;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool ARQ_SOCKET_Server::start(const char* node, const char* service)
|
||||
{
|
||||
|
|
@ -290,17 +290,17 @@ bool ARQ_SOCKET_Server::start(const char* node, const char* service)
|
|||
inst->server_socket->set_nonblocking();
|
||||
}
|
||||
catch (const SocketException& e) {
|
||||
errstring = "Could not start ARQ server (";
|
||||
errstring.append(e.what()).append(")");
|
||||
if (e.error() == EADDRINUSE)
|
||||
errstring.append("\nMultiple instances of fldigi??");
|
||||
LOG_ERROR("%s", errstring.c_str());
|
||||
fl_message(errstring.c_str());
|
||||
|
||||
delete arq_socket_thread;
|
||||
arq_socket_thread = 0;
|
||||
delete inst;
|
||||
inst = 0;
|
||||
errstring = "Could not start ARQ server (";
|
||||
errstring.append(e.what()).append(")");
|
||||
if (e.error() == EADDRINUSE)
|
||||
errstring.append("\nMultiple instances of fldigi??");
|
||||
LOG_ERROR("%s", errstring.c_str());
|
||||
fl_message(errstring.c_str());
|
||||
|
||||
delete arq_socket_thread;
|
||||
arq_socket_thread = 0;
|
||||
delete inst;
|
||||
inst = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -326,9 +326,9 @@ void* ARQ_SOCKET_Server::thread_func(void*)
|
|||
}
|
||||
catch (const SocketException& e) {
|
||||
if (e.error() != ETIMEDOUT) {
|
||||
errstring = e.what();
|
||||
LOG_ERROR("%s", errstring.c_str());
|
||||
Fl::add_timeout(0.0, popup_msg, (void*)errstring.c_str());
|
||||
errstring = e.what();
|
||||
LOG_ERROR("%s", errstring.c_str());
|
||||
Fl::add_timeout(0.0, popup_msg, (void*)errstring.c_str());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,11 +48,13 @@
|
|||
|
||||
#include "xmlreader.h"
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
int rotoroffset = 0;
|
||||
|
||||
string host = "online.qrz.com";
|
||||
string qrzhost = "online.qrz.com";
|
||||
string qrzSessionKey;
|
||||
string qrzalert;
|
||||
string qrzerror;
|
||||
|
|
@ -342,12 +344,12 @@ bool getSessionKey(string& sessionpage)
|
|||
detail += PACKAGE_VERSION;
|
||||
detail += " HTTP/1.0\n";
|
||||
detail += "Host: ";
|
||||
detail += host;
|
||||
detail += qrzhost;
|
||||
detail += "\n";
|
||||
detail += "Connection: close\n";
|
||||
detail += "\n";
|
||||
|
||||
return request_reply(host, "http", detail, sessionpage);
|
||||
return request_reply(qrzhost, "http", detail, sessionpage);
|
||||
}
|
||||
|
||||
bool QRZGetXML(string& xmlpage)
|
||||
|
|
@ -359,12 +361,12 @@ bool QRZGetXML(string& xmlpage)
|
|||
detail += callsign;
|
||||
detail += " HTTP/1.0\n";
|
||||
detail += "Host: ";
|
||||
detail += host;
|
||||
detail += qrzhost;
|
||||
detail += "\n";
|
||||
detail += "Connection: close\n";
|
||||
detail += "\n";
|
||||
|
||||
return request_reply(host, "http", detail, xmlpage);
|
||||
return request_reply(qrzhost, "http", detail, xmlpage);
|
||||
}
|
||||
|
||||
int bearing(const char *myqra, const char *dxqra) {
|
||||
|
|
@ -613,7 +615,6 @@ void QRZquery()
|
|||
|
||||
// Hamcall specific functions
|
||||
|
||||
#define HAMCALL_HOST "www.hamcall.net"
|
||||
#define HAMCALL_CALL 181
|
||||
#define HAMCALL_FIRST 184
|
||||
#define HAMCALL_CITY 191
|
||||
|
|
@ -674,7 +675,7 @@ bool HAMCALLget(string& htmlpage)
|
|||
url_detail += VERSION;
|
||||
url_detail += "\r\n";
|
||||
|
||||
return request_reply(host, "http", url_detail, htmlpage);
|
||||
return request_reply("www.hamcall.net", "http", url_detail, htmlpage);
|
||||
}
|
||||
|
||||
void HAMCALLquery()
|
||||
|
|
@ -683,6 +684,7 @@ void HAMCALLquery()
|
|||
|
||||
if (HAMCALLget(htmlpage)) {
|
||||
parse_html(htmlpage);
|
||||
//LOG_INFO(htmlpage.c_str());
|
||||
QRZ_disp_result();
|
||||
} else {
|
||||
FL_LOCK();
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ status progStatus = {
|
|||
MODE_BPSK31, // trx_mode lastmode;
|
||||
50, // int mainX;
|
||||
50, // int mainY;
|
||||
WNOM, // int mainW;
|
||||
(WNOM > 600 ? WNOM : 600), // int mainW;
|
||||
HNOM, // int mainH;
|
||||
Hrcvtxt, // int RxTextHeight;
|
||||
false, // bool rigShown;
|
||||
|
|
|
|||
|
|
@ -77,7 +77,14 @@ int FTextBase::handle(int event)
|
|||
if (event == FL_MOUSEWHEEL && !Fl::event_inside(this))
|
||||
return 1;
|
||||
|
||||
return Fl_Text_Editor_mod::handle(event);
|
||||
// Fl_Text_Editor::handle() calls window()->cursor(FL_CURSOR_DONE) when
|
||||
// it receives an FL_KEYBOARD event, which crashes some buggy X drivers
|
||||
// (e.g. Intel on the Asus Eee PC). Call handle_key directly to work
|
||||
// around this problem.
|
||||
if (event == FL_KEYBOARD)
|
||||
return Fl_Text_Editor_mod::handle_key();
|
||||
else
|
||||
return Fl_Text_Editor_mod::handle(event);
|
||||
}
|
||||
|
||||
void FTextBase::setFont(Fl_Font f, int attr)
|
||||
|
|
@ -1371,7 +1378,7 @@ void FTextLog::menu_cb(int val)
|
|||
break;
|
||||
|
||||
case LOG_MENU_WRAP:
|
||||
log_menu[RX_MENU_WRAP].flags ^= FL_MENU_VALUE;
|
||||
log_menu[LOG_MENU_WRAP].flags ^= FL_MENU_VALUE;
|
||||
wrap_mode((wrap = !wrap), wrap_col);
|
||||
show_insert_position();
|
||||
break;
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue