diff --git a/src/Makefile.am b/src/Makefile.am index c3f82390..fe6f3d64 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -173,8 +173,6 @@ fldigi_SOURCES += \ include/Combo_Box.h \ include/Combo_List.h \ include/confdialog.h \ - include/Enumerations.h \ - include/FLdigiTypes.h \ include/FTextView.h \ include/fileselect.h \ include/Fl_Text_Display_mod.H \ @@ -209,7 +207,6 @@ fldigi_SOURCES += \ include/gettext.h \ include/globals.h \ include/icons.h \ - include/id.h \ include/interleave.h \ include/jalocha/pj_cmpx.h \ include/jalocha/pj_fft.h \ diff --git a/src/combo/combo.cxx b/src/combo/combo.cxx index d57a2902..e715612a 100644 --- a/src/combo/combo.cxx +++ b/src/combo/combo.cxx @@ -1,5 +1,9 @@ #include +#include +#include +#include + #include "combo.h" #include "debug.h" diff --git a/src/cw_rtty/morse.cxx b/src/cw_rtty/morse.cxx index 04f34a5a..353376b9 100644 --- a/src/cw_rtty/morse.cxx +++ b/src/cw_rtty/morse.cxx @@ -28,6 +28,8 @@ #include +#include + #include "morse.h" /* ---------------------------------------------------------------------- */ diff --git a/src/cw_rtty/rtty.cxx b/src/cw_rtty/rtty.cxx index 8440f1a4..b2b509ee 100644 --- a/src/cw_rtty/rtty.cxx +++ b/src/cw_rtty/rtty.cxx @@ -29,6 +29,9 @@ using namespace std; #include "rtty.h" +#include "fl_digi.h" +#include "digiscope.h" +#include "misc.h" #include "waterfall.h" #include "confdialog.h" #include "configuration.h" diff --git a/src/dialogs/Viewer.cxx b/src/dialogs/Viewer.cxx index 459cc4bc..9712e862 100644 --- a/src/dialogs/Viewer.cxx +++ b/src/dialogs/Viewer.cxx @@ -3,6 +3,7 @@ #include #include "Viewer.h" +#include "trx.h" #include "main.h" #include "viewpsk.h" #include "configuration.h" @@ -16,7 +17,7 @@ #include #include -#include +#include #include diff --git a/src/dialogs/confdialog.cxx b/src/dialogs/confdialog.cxx index 77fea650..83a6355c 100644 --- a/src/dialogs/confdialog.cxx +++ b/src/dialogs/confdialog.cxx @@ -2779,7 +2779,6 @@ an merging")); cntCWdash2dot->type(1); cntCWdash2dot->minimum(2.5); cntCWdash2dot->maximum(4); - cntCWdash2dot->step(0.1); cntCWdash2dot->value(3); cntCWdash2dot->callback((Fl_Callback*)cb_cntCWdash2dot); cntCWdash2dot->align(FL_ALIGN_RIGHT); @@ -2790,7 +2789,6 @@ an merging")); cntCWrisetime->type(1); cntCWrisetime->minimum(0); cntCWrisetime->maximum(15); - cntCWrisetime->step(0.1); cntCWrisetime->value(4); cntCWrisetime->callback((Fl_Callback*)cb_cntCWrisetime); cntCWrisetime->align(FL_ALIGN_RIGHT); @@ -2893,7 +2891,6 @@ an merging")); valDominoEX_BW->type(1); valDominoEX_BW->minimum(1); valDominoEX_BW->maximum(2); - valDominoEX_BW->step(0.1); valDominoEX_BW->value(1.5); valDominoEX_BW->callback((Fl_Callback*)cb_valDominoEX_BW); valDominoEX_BW->align(FL_ALIGN_RIGHT); @@ -2908,7 +2905,6 @@ an merging")); { Fl_Value_Slider* o = valDomCWI = new Fl_Value_Slider(15, 207, 260, 20, _("CWI threshold")); valDomCWI->tooltip(_("CWI detection and suppression")); valDomCWI->type(1); - valDomCWI->step(0.01); valDomCWI->textsize(14); valDomCWI->callback((Fl_Callback*)cb_valDomCWI); valDomCWI->align(FL_ALIGN_TOP); @@ -3380,7 +3376,6 @@ an merging")); valTHOR_BW->type(1); valTHOR_BW->minimum(1); valTHOR_BW->maximum(2); - valTHOR_BW->step(0.1); valTHOR_BW->value(1.5); valTHOR_BW->callback((Fl_Callback*)cb_valTHOR_BW); valTHOR_BW->align(FL_ALIGN_RIGHT); @@ -3395,7 +3390,6 @@ an merging")); { Fl_Value_Slider* o = valThorCWI = new Fl_Value_Slider(15, 218, 260, 20, _("CWI threshold")); valThorCWI->tooltip(_("CWI detection and suppression")); valThorCWI->type(1); - valThorCWI->step(0.01); valThorCWI->textsize(14); valThorCWI->callback((Fl_Callback*)cb_valThorCWI); valThorCWI->align(FL_ALIGN_TOP); @@ -3971,7 +3965,6 @@ l with your sound hardware.")); valPCMvolume->tooltip(_("Set the sound card PCM level")); valPCMvolume->type(1); valPCMvolume->selection_color(FL_SELECTION_COLOR); - valPCMvolume->step(0.01); valPCMvolume->value(0.8); valPCMvolume->textsize(14); valPCMvolume->callback((Fl_Callback*)cb_valPCMvolume); diff --git a/src/dialogs/fl_digi.cxx b/src/dialogs/fl_digi.cxx index 3d05bb6f..40f6b821 100644 --- a/src/dialogs/fl_digi.cxx +++ b/src/dialogs/fl_digi.cxx @@ -49,6 +49,8 @@ #include #include #include +#include +#include #include "waterfall.h" #include "raster.h" @@ -123,6 +125,8 @@ #include "rx_extract.h" #include "speak.h" +using namespace std; + Fl_Double_Window *fl_digi_main=(Fl_Double_Window *)0; Fl_Help_Dialog *help_dialog = (Fl_Help_Dialog *)0; Fl_Double_Window *scopeview = (Fl_Double_Window *)0; diff --git a/src/dominoex/dominoex.cxx b/src/dominoex/dominoex.cxx index 645d47c6..e05f8fce 100644 --- a/src/dominoex/dominoex.cxx +++ b/src/dominoex/dominoex.cxx @@ -32,6 +32,7 @@ #include "dominoex.h" #include "trx.h" +#include "fl_digi.h" #include "fft.h" #include "filters.h" #include "misc.h" diff --git a/src/feld/feld.cxx b/src/feld/feld.cxx index 9b9b1573..eb137747 100644 --- a/src/feld/feld.cxx +++ b/src/feld/feld.cxx @@ -39,6 +39,7 @@ using namespace std; #include "feld.h" +#include "fl_digi.h" #include "fontdef.h" #include "confdialog.h" #include "qrunner.h" diff --git a/src/fft/fft.cxx b/src/fft/fft.cxx index 1e63801c..4730a2a3 100644 --- a/src/fft/fft.cxx +++ b/src/fft/fft.cxx @@ -19,6 +19,7 @@ #include +#include "misc.h" #include "fft.h" // n = size of fourier transform in complex pairs @@ -161,6 +162,21 @@ void Cfft::irdft(double *RealData) */ } +void Cfft::setWindow(fftPrefilter pf) +{ + wintype = pf; + if (wintype == FFT_TRIANGULAR) + TriangularWindow(fftwin, fftlen*2); + else if (wintype == FFT_HAMMING) + HammingWindow(fftwin, fftlen*2); + else if (wintype == FFT_HANNING) + HanningWindow(fftwin, fftlen*2); + else if (wintype == FFT_BLACKMAN) + BlackmanWindow(fftwin, fftlen*2); + else + RectWindow(fftwin, fftlen*2); +} + /* -------- initializing routines -------- */ diff --git a/src/filters/fftfilt.cxx b/src/filters/fftfilt.cxx index 6b132849..8e60307e 100644 --- a/src/filters/fftfilt.cxx +++ b/src/filters/fftfilt.cxx @@ -12,8 +12,8 @@ #include -#include -#include +#include +#include "misc.h" #include "fftfilt.h" diff --git a/src/include/Combo_Box.h b/src/include/Combo_Box.h index c769d21c..9f5122d1 100644 --- a/src/include/Combo_Box.h +++ b/src/include/Combo_Box.h @@ -20,8 +20,6 @@ #include #include -//#include "Enumerations.h" - //! This is a generic base class for implementing widgets with combo-box-like behavior (i.e. a pulldown menu where the "input" area is editable class Combo_Box : public Fl_Group { diff --git a/src/include/Enumerations.h b/src/include/Enumerations.h deleted file mode 100644 index aadb1f9d..00000000 --- a/src/include/Enumerations.h +++ /dev/null @@ -1,69 +0,0 @@ -// $Id: Flu_Enumerations.h,v 1.16 2004/04/03 17:35:41 jbryan Exp $ - -/*************************************************************** - * FLU - FLTK Utility Widgets - * Copyright (C) 2002 Ohio Supercomputer Center, Ohio State University - * - * This file and its content is protected by a software license. - * You should have received a copy of this license with this file. - * If not, please contact the Ohio Supercomputer Center immediately: - * Attn: Jason Bryan Re: FLU 1224 Kinnear Rd, Columbus, Ohio 43212 - * - ***************************************************************/ - - -#ifndef _FLU_ENUMERATIONS_H -#define _FLU_ENUMERATIONS_H - -/* these enums are all global to conform to the fltk standard */ - -/*! Selection modes for FLU widgets that select stuff. - Used by: - Flu_Tree_Browser -*/ -enum { - FLU_NO_SELECT, - FLU_SINGLE_SELECT, - FLU_MULTI_SELECT -}; - -/*! Data insertion modes for FLU widgets that insert stuff. - Used by: - Flu_Tree_Browser -*/ -enum { - FLU_INSERT_FRONT, - FLU_INSERT_BACK, - FLU_INSERT_SORTED, - FLU_INSERT_SORTED_REVERSE -}; - -/*! Selection drag modes for FLU widgets that select stuff (used while the mouse is being dragged). - Used by: - Flu_Tree_Browser -*/ -enum { - FLU_DRAG_IGNORE, - FLU_DRAG_TO_SELECT, - FLU_DRAG_TO_MOVE -}; - -/*! Callback reasons for FLU widgets that select stuff. - Used by: - Flu_Tree_Browser -*/ -enum { - FLU_HILIGHTED, - FLU_UNHILIGHTED, - FLU_SELECTED, - FLU_UNSELECTED, - FLU_OPENED, - FLU_CLOSED, - FLU_DOUBLE_CLICK, - FLU_WIDGET_CALLBACK, - FLU_MOVED_NODE, - FLU_NEW_NODE, - FLU_NOTHING -}; - -#endif diff --git a/src/include/FLdigiTypes.h b/src/include/FLdigiTypes.h deleted file mode 100644 index 995d8cb2..00000000 --- a/src/include/FLdigiTypes.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef DIGI_TYPES_H -#define DIGI_TYPES_H - -typedef char CHAR; // 8 bits -127 to 127 -typedef unsigned char UCHAR; // 8 bits 0 to 255 -typedef int INT; // 16 or 32 bits -typedef unsigned int UINT; // 16 or 32 bits -typedef short int INT16; // 16 bits, -32767 to 32767 -typedef unsigned short int UINT16; // 16 bits, 0 to 65535 -typedef long int INT32; // 32 bits -2,147,483,647 to 2,147,483,647 -typedef unsigned long int UINT32; // 32 bits 0 to 4,294,967,295 -typedef float FLOAT; // 32 bits, 6 digits of precision -typedef double DOUBLE; // 64 bits, 10 digits of precision -typedef long double LDOUBLE;// 80 bits, 10 digits of precision - -#endif diff --git a/src/include/FreqControl.h b/src/include/FreqControl.h index 3a614b9c..415a11aa 100644 --- a/src/include/FreqControl.h +++ b/src/include/FreqControl.h @@ -35,10 +35,6 @@ #ifndef _FREQCONTROL_H_ #define _FREQCONTROL_H_ -#include -#include -#include - #include #include #include diff --git a/src/include/Viewer.h b/src/include/Viewer.h index 30e266b9..b6661881 100644 --- a/src/include/Viewer.h +++ b/src/include/Viewer.h @@ -1,11 +1,9 @@ #ifndef Viewer_h #define Viewer_h -#include + #include #include #include -#include -#include enum { VIEWER_LABEL_AF, VIEWER_LABEL_RF, VIEWER_LABEL_CH, VIEWER_LABEL_NTYPES }; diff --git a/src/include/adif_io.h b/src/include/adif_io.h index db50c5d6..811d3fa4 100644 --- a/src/include/adif_io.h +++ b/src/include/adif_io.h @@ -1,9 +1,7 @@ #ifndef ADIFIO #define ADIFIO -#include -#include -#include +#include #include "qso_db.h" diff --git a/src/include/analysis.h b/src/include/analysis.h index bceff23c..cb7f5163 100644 --- a/src/include/analysis.h +++ b/src/include/analysis.h @@ -24,23 +24,13 @@ #ifndef _anal_H #define _anal_H -#include -#include -#include -#include -#include -#include -#include #include +#include #include "complex.h" -#include "modem.h" -#include "trx.h" -#include "misc.h" #include "filters.h" #include "fftfilt.h" -#include "digiscope.h" -#include "main.h" +#include "modem.h" #include "mbuffer.h" #define anal_SampleRate 8000 @@ -78,8 +68,8 @@ private: double nco(double freq); void writeFile(); - ofstream analysisFile; - string analysisFilename; + std::ofstream analysisFile; + std::string analysisFilename; public: anal(); diff --git a/src/include/benchmark.h b/src/include/benchmark.h index 331a92d6..e4ee6e6e 100644 --- a/src/include/benchmark.h +++ b/src/include/benchmark.h @@ -3,6 +3,7 @@ #include #include +#include "globals.h" struct benchmark_params { trx_mode modem; diff --git a/src/include/calendar.h b/src/include/calendar.h index ffaaedfd..a329ab0b 100644 --- a/src/include/calendar.h +++ b/src/include/calendar.h @@ -30,9 +30,8 @@ #include #include #include -#include -#include "flinput2.h" +#include "flinput2.h" #include "date.h" class Fl_Calendar_Base : public Fl_Group , public Date diff --git a/src/include/colorbox.h b/src/include/colorbox.h index b32d6eb7..c4dd4f16 100644 --- a/src/include/colorbox.h +++ b/src/include/colorbox.h @@ -1,9 +1,6 @@ #ifndef COLORBOX_H #define COLORBOX_H -#include -#include -#include #include extern void loadPalette(); diff --git a/src/include/combo.h b/src/include/combo.h index c9fb3b19..b83ba627 100644 --- a/src/include/combo.h +++ b/src/include/combo.h @@ -26,17 +26,11 @@ #ifndef _FL_COMBOBOX_H #define _FL_COMBOBOX_H -#include -#include -#include -#include -#include - #include #include #include -#include #include +#include #define FL_COMBO_UNIQUE 1 #define FL_COMBO_UNIQUE_NOCASE 2 diff --git a/src/include/complex.h b/src/include/complex.h index f66fc37b..338261b8 100644 --- a/src/include/complex.h +++ b/src/include/complex.h @@ -5,7 +5,7 @@ #ifndef _COMPLEX_H #define _COMPLEX_H -#include +#include class complex { public: diff --git a/src/include/configuration.h b/src/include/configuration.h index 914a0306..2a18933c 100644 --- a/src/include/configuration.h +++ b/src/include/configuration.h @@ -3,8 +3,8 @@ #include -#include "main.h" #include "rtty.h" +#include "waterfall.h" #include "lookupcall.h" #include "Viewer.h" @@ -178,7 +178,7 @@ ELEM_(bool, autoextract, "AUTOEXTRACT", false) \ ELEM_(bool, speak, "SPEAK", false) \ /* QRZ */ \ - ELEM_(int, QRZ, "QRZTYPE", 0) /* Not available */ \ + ELEM_(int, QRZ, "QRZTYPE", QRZNONE) \ ELEM_(std::string, QRZpathname, "QRZPATHNAME", "") \ ELEM_(std::string, QRZusername, "QRZUSER", "") \ ELEM_(std::string, QRZuserpassword, "QRZPASSWORD", "") \ diff --git a/src/include/date.h b/src/include/date.h index a14bfa63..434164a9 100644 --- a/src/include/date.h +++ b/src/include/date.h @@ -25,12 +25,7 @@ #ifndef DATE_H #define DATE_H -#include -#include -#include -#include -#include -#include +#include typedef enum { SUNDAY, diff --git a/src/include/digiscope.h b/src/include/digiscope.h index 579b1956..ba1cc989 100644 --- a/src/include/digiscope.h +++ b/src/include/digiscope.h @@ -29,14 +29,8 @@ #ifndef DIGISCOPE_H #define DIGISCOPE_H -#include -#include -#include - -#include -#include #include -#include + #include "complex.h" class Digiscope : public Fl_Widget { diff --git a/src/include/dominoex.h b/src/include/dominoex.h index edf9a955..62dab9e3 100644 --- a/src/include/dominoex.h +++ b/src/include/dominoex.h @@ -29,7 +29,7 @@ #include #include "complex.h" -#include "trx.h" +#include "modem.h" #include "fft.h" #include "filters.h" #include "fftfilt.h" @@ -45,9 +45,6 @@ #include "interleave.h" #include "viterbi.h" - -using namespace std; - #define NUMTONES 18 //#define MAXFFTS 4 #define MAXFFTS 8 @@ -126,7 +123,7 @@ protected: int txstate; int txprevtone; unsigned int bitshreg; - string strSecXmtText; + std::string strSecXmtText; // FEC variables viterbi *MuPskDec; diff --git a/src/include/dsp.h b/src/include/dsp.h index d64051cc..f627aeb7 100644 --- a/src/include/dsp.h +++ b/src/include/dsp.h @@ -24,9 +24,9 @@ * */ -#include -#include -#include +#include +#include +#include // ---------------------------------------------------------------------------- // double/other-complex type diff --git a/src/include/fft.h b/src/include/fft.h index 887a2699..99f8a25a 100644 --- a/src/include/fft.h +++ b/src/include/fft.h @@ -19,10 +19,7 @@ #ifndef FFT_H #define FFT_H -#include -#include #include "complex.h" -#include "misc.h" enum fftPrefilter {FFT_NONE, FFT_HAMMING, FFT_HANNING, FFT_BLACKMAN, FFT_TRIANGULAR}; @@ -61,19 +58,7 @@ public: void irdft(double *a); void irdft(complex *a) { irdft( (double *) a); } - void setWindow(fftPrefilter pf) { - wintype = pf; - if (wintype == FFT_TRIANGULAR) - TriangularWindow(fftwin, fftlen*2); - else if (wintype == FFT_HAMMING) - HammingWindow(fftwin, fftlen*2); - else if (wintype == FFT_HANNING) - HanningWindow(fftwin, fftlen*2); - else if (wintype == FFT_BLACKMAN) - BlackmanWindow(fftwin, fftlen*2); - else - RectWindow(fftwin, fftlen*2); - } + void setWindow(fftPrefilter pf); }; #endif diff --git a/src/include/fftfilt.h b/src/include/fftfilt.h index c4216d7c..d5dc120b 100644 --- a/src/include/fftfilt.h +++ b/src/include/fftfilt.h @@ -7,7 +7,6 @@ #include "complex.h" #include "fft.h" -#include "misc.h" //---------------------------------------------------------------------- diff --git a/src/include/fl_digi.h b/src/include/fl_digi.h index eec52649..77f281c6 100644 --- a/src/include/fl_digi.h +++ b/src/include/fl_digi.h @@ -22,23 +22,14 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // ---------------------------------------------------------------------------- -#ifndef fl_digi_h +#ifndef FL_DIGI_H +#define FL_DIGI_H -#define fl_digi_h - -#include - -#include #include -#include -#include -#include #include #include #include #include -#include -#include #include #include "combo.h" @@ -52,7 +43,6 @@ #include "FreqControl.h" #include -using namespace std; extern Fl_Double_Window *fl_digi_main; extern Fl_Double_Window *scopeview; @@ -161,8 +151,8 @@ extern void put_Status1(const char *msg, double timeout = 0.0, status_timeout ac extern void put_Status2(const char *msg, double timeout = 0.0, status_timeout action = STATUS_CLEAR); extern void show_frequency(long long); -extern void show_mode(const string& mode); -extern void show_bw(const string& sWidth); +extern void show_mode(const std::string& mode); +extern void show_bw(const std::string& sWidth); extern void show_spot(bool v); extern void showMacroSet(); diff --git a/src/include/fl_lock.h b/src/include/fl_lock.h index d829ccdc..99fc4ce9 100644 --- a/src/include/fl_lock.h +++ b/src/include/fl_lock.h @@ -32,6 +32,10 @@ #define FL_UNLOCK_E(x) FL_UNLOCK(x) #define FL_AWAKE_E(x) FL_AWAKE(x) +#if !defined(NDEBUG) && !defined(NO_LOCKS) +# include +#endif + #ifdef NDEBUG # define FL_LOCK(x) Fl::lock(x) # define FL_UNLOCK(x) Fl::unlock(x) diff --git a/src/include/font_browser.h b/src/include/font_browser.h index 3c342c51..e3ce03d8 100644 --- a/src/include/font_browser.h +++ b/src/include/font_browser.h @@ -38,10 +38,6 @@ #include #include #include -#include -#include -#include -#include // Preview box for showing font class Preview_Box : public Fl_Widget diff --git a/src/include/globals.h b/src/include/globals.h index 1b5c244c..48f47300 100644 --- a/src/include/globals.h +++ b/src/include/globals.h @@ -28,7 +28,6 @@ #include #include -#include "fldigi-config.h" enum state_t { STATE_PAUSE = 0, diff --git a/src/include/id.h b/src/include/id.h deleted file mode 100644 index 92d8bf19..00000000 --- a/src/include/id.h +++ /dev/null @@ -1,61 +0,0 @@ -// ---------------------------------------------------------------------------- -// id.h -- WATERFALL ID -// -// Copyright (C) 2006 -// Dave Freese, W1HKJ -// -// This file is part of fldigi. -// -// fldigi is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// fldigi 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with fldigi; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// ---------------------------------------------------------------------------- - -#ifndef _ID_H -#define _ID_H - -#include -#include "complex.h" - -using namespace std; - -struct idfntchr { char c; int byte[5]; }; - -class id { -public: -#define NUMROWS 5 -#define NUMCHARS 2 -#define NUMTONES 5 -#define TONESPACING 6 -#define IDSYMLEN 3072 - -private: - - static idfntchr idch[]; - static int mask[]; - static double w[]; - static double txpulse[]; - static double outbuf[]; - - void make_pulse(double samplerate); - void make_tones(double frequency, double samplerate); - void send(long int); - void sendchars(std::string); - -public: - id(); - ~id(); - void text(string s, double frequency, int samplerate); -}; - -#endif diff --git a/src/include/locator.h b/src/include/locator.h index 27fddeec..ae15308d 100644 --- a/src/include/locator.h +++ b/src/include/locator.h @@ -5,7 +5,6 @@ #if USE_HAMLIB # include - #else # ifdef __cplusplus extern "C" { diff --git a/src/include/logbook.h b/src/include/logbook.h index f2de250e..08e4c078 100644 --- a/src/include/logbook.h +++ b/src/include/logbook.h @@ -1,10 +1,8 @@ #ifndef FL_LOGBOOK_H #define FL_LOGBOOK_H -#include "adif_io.h" #include "lgbook.h" #include "logsupport.h" -#include "logbook.h" extern void start_logbook(); extern void close_logbook(); diff --git a/src/include/logger.h b/src/include/logger.h index a4af8587..42170afc 100644 --- a/src/include/logger.h +++ b/src/include/logger.h @@ -24,11 +24,6 @@ #ifndef _LOGGER_H #define _LOGGER_H -#include - -using namespace std; - - // IPC interface to Xlog and fl_logbook #define LOG_MVERSION "1" diff --git a/src/include/logsupport.h b/src/include/logsupport.h index 6c3a8993..ca9fca38 100644 --- a/src/include/logsupport.h +++ b/src/include/logsupport.h @@ -3,9 +3,11 @@ #include +#include +#include + #include "qso_db.h" #include "adif_io.h" -#include "date.h" #ifdef __CYGWIN__ # define ADIF_SUFFIX "adi" diff --git a/src/include/macroedit.h b/src/include/macroedit.h index 374e67bb..6746e056 100644 --- a/src/include/macroedit.h +++ b/src/include/macroedit.h @@ -1,9 +1,8 @@ -#ifndef macroedit_h -#define macroedit_h +#ifndef MACROEDIT_H +#define MACROEDIT_H -#include +#include #include -#include #include #include #include "flinput2.h" diff --git a/src/include/macros.h b/src/include/macros.h index f7e66d10..8ac52fe4 100644 --- a/src/include/macros.h +++ b/src/include/macros.h @@ -1,16 +1,8 @@ #ifndef _MACROS_H #define _MACROS_H -#include -#include -#include -#include #include -#include "main.h" - -using namespace std; - #define NUMMACKEYS 12 #define NUMKEYROWS 4 #define MAXMACROS (NUMKEYROWS * NUMMACKEYS) @@ -19,7 +11,7 @@ struct CONTESTCNTR { int count; char szCount[20]; char szDisp[40]; - string fmt; + std::string fmt; CONTESTCNTR() { count = 0; fmt = "%04d"; @@ -36,14 +28,14 @@ struct CONTESTCNTR { struct MACROTEXT { bool changed; - string name[MAXMACROS]; - string text[MAXMACROS]; - int loadMacros(string filename); + std::string name[MAXMACROS]; + std::string text[MAXMACROS]; + int loadMacros(const std::string& filename); void loadDefault(); void openMacroFile(); void saveMacroFile(); - void saveMacros(string); - string expandMacro(int n); + void saveMacros(const std::string& fname); + std::string expandMacro(int n); void execute(int n); MACROTEXT() { changed = false; @@ -55,14 +47,14 @@ struct MACROTEXT { } } private: - string expanded; - void loadnewMACROS(string &s, size_t &i); + std::string expanded; + void loadnewMACROS(std::string& s, size_t &i); }; extern MACROTEXT macros; extern CONTESTCNTR contest_count; -extern string info1msg; -extern string info2msg; +extern std::string info1msg; +extern std::string info2msg; #endif diff --git a/src/include/main.h b/src/include/main.h index 62235fa3..f8a025fd 100644 --- a/src/include/main.h +++ b/src/include/main.h @@ -1,54 +1,45 @@ -#ifndef _MAIN_H -#define _MAIN_H +#ifndef MAIN_H_ +#define MAIN_H_ #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "trx.h" -#include "modem.h" -#include "fl_digi.h" +#include + #include "ptt.h" #include "log.h" #if USE_HAMLIB - #include "rigclass.h" +# include "rigclass.h" #endif -extern string appname; -extern string HomeDir; -extern string RigsDir; -extern string ScriptsDir; -extern string PalettesDir; -extern string LogsDir; -extern string PicsDir; -extern string HelpDir; -extern string MacrosDir; -extern string WrapDir; -extern string TalkDir; -extern string TempDir; -extern string PskMailDir; +extern std::string appname; +extern std::string HomeDir; +extern std::string RigsDir; +extern std::string ScriptsDir; +extern std::string PalettesDir; +extern std::string LogsDir; +extern std::string PicsDir; +extern std::string HelpDir; +extern std::string MacrosDir; +extern std::string WrapDir; +extern std::string TalkDir; +extern std::string TempDir; +extern std::string PskMailDir; -extern string xmlfname; +extern std::string xmlfname; -extern std::string scDevice[2]; +extern std::string scDevice[2]; extern PTT *push2talk; + #if USE_HAMLIB extern Rig *xcvr; #endif -extern cLogfile *Maillogfile; -extern cLogfile *logfile; +extern cLogfile *Maillogfile; +extern cLogfile *logfile; extern bool gmfskmail; extern bool arqmode; -extern string ArqFilename; +extern std::string ArqFilename; extern bool mailclient; extern bool mailserver; extern bool tlfio; @@ -79,4 +70,3 @@ extern TXMSGSTRUC txmsgst; extern int txmsgid; #endif - diff --git a/src/include/mfsk.h b/src/include/mfsk.h index 7cd003c7..ee817de0 100644 --- a/src/include/mfsk.h +++ b/src/include/mfsk.h @@ -4,7 +4,13 @@ #ifndef _MFSK_H #define _MFSK_H -#include "trx.h" +#include +#include +#include +#include + +#include "globals.h" +#include "modem.h" #include "fft.h" #include "filters.h" #include "interleave.h" @@ -12,11 +18,8 @@ #include "complex.h" #include "mfskvaricode.h" #include "mbuffer.h" - -//#include "fileselect.h" - #include "picture.h" -#include + #define MFSKSampleRate 8000 diff --git a/src/include/misc.h b/src/include/misc.h index 39ed4f65..9751aa7c 100644 --- a/src/include/misc.h +++ b/src/include/misc.h @@ -25,7 +25,7 @@ #ifndef _MISC_H #define _MISC_H -#include +#include extern unsigned long hweight32(unsigned long w); extern unsigned short int hweight16(unsigned short int w); @@ -97,4 +97,6 @@ void BlackmanWindow(double *array, int n); // Simple about effective as Hamming or Hanning void TriangularWindow(double *array, int n); +#define fftabs(a,b) sqrt((a)*(a) + (b)*(b)) + #endif diff --git a/src/include/modem.h b/src/include/modem.h index 77f3bb1a..4f0e50f6 100644 --- a/src/include/modem.h +++ b/src/include/modem.h @@ -7,14 +7,9 @@ #include "threads.h" -#include "misc.h" #include "sound.h" -#include "waterfall.h" -#include "fl_digi.h" +#include "digiscope.h" #include "globals.h" -#include "fl_digi.h" - -#include "fldigi-config.h" #include "morse.h" #define OUTBUFSIZE 16384 diff --git a/src/include/morse.h b/src/include/morse.h index 1fab25d9..9d70ec37 100644 --- a/src/include/morse.h +++ b/src/include/morse.h @@ -31,11 +31,6 @@ #ifndef _MORSE_H #define _MORSE_H -#include -#include -#include - - #define MorseTableSize 256 #define CW_ENTRY_NULL 0 diff --git a/src/include/mt63.h b/src/include/mt63.h index 0b809c93..f19c05b3 100644 --- a/src/include/mt63.h +++ b/src/include/mt63.h @@ -28,13 +28,9 @@ #ifndef MT63_MODEM_H #define MT63_MODEM_H -#include "sound.h" -#include "confdialog.h" #include "dsp.h" #include "mt63base.h" -#include "trx.h" - -using namespace std; +#include "modem.h" class mt63 : public modem { private: diff --git a/src/include/olivia.h b/src/include/olivia.h index 2e6219e9..12891861 100644 --- a/src/include/olivia.h +++ b/src/include/olivia.h @@ -28,7 +28,7 @@ #ifndef _OLIVIA_H #define _OLIVIA_H -#include "trx.h" +#include "modem.h" #include "jalocha/pj_mfsk.h" class olivia : public modem { diff --git a/src/include/picture.h b/src/include/picture.h index 8eb96329..82a41884 100644 --- a/src/include/picture.h +++ b/src/include/picture.h @@ -26,18 +26,9 @@ #ifndef picture_H #define picture_H -#include -#include -#include -#include - -#include -#include #include -#include #include - -#include "threads.h" +#include class picture : public Fl_Widget { private: diff --git a/src/include/psk.h b/src/include/psk.h index aaebbc4a..bec37e1f 100644 --- a/src/include/psk.h +++ b/src/include/psk.h @@ -26,7 +26,8 @@ #define _PSK_H #include "complex.h" -#include "trx.h" +#include "modem.h" +#include "globals.h" #include "viterbi.h" #include "filters.h" #include "pskcoeff.h" diff --git a/src/include/pskeval.h b/src/include/pskeval.h index 1a03c35b..303793f0 100644 --- a/src/include/pskeval.h +++ b/src/include/pskeval.h @@ -26,9 +26,7 @@ #define _PSKEVAL_H #include "complex.h" -#include "trx.h" #include "filters.h" -#include "fldigi-config.h" #include "waterfall.h" #define FLOWER 200 diff --git a/src/include/qrunner.h b/src/include/qrunner.h index 03039860..a203d377 100644 --- a/src/include/qrunner.h +++ b/src/include/qrunner.h @@ -52,7 +52,6 @@ namespace qrbind { #include "threads.h" #include "qrunner/fqueue.h" -#include "timeops.h" class qexception : public std::exception { diff --git a/src/include/qso_db.h b/src/include/qso_db.h index 16f1fc2f..fa1f97ee 100644 --- a/src/include/qso_db.h +++ b/src/include/qso_db.h @@ -1,10 +1,7 @@ #ifndef QSO_DB #define QSO_DB -#include - -#include -#include +#include #include "adif_def.h" diff --git a/src/include/raster.h b/src/include/raster.h index aa513daf..0b0f0015 100644 --- a/src/include/raster.h +++ b/src/include/raster.h @@ -24,10 +24,7 @@ #ifndef _RASTER_H #define _RASTER_H -#include -#include #include -#include class Raster : public Fl_Widget { public: diff --git a/src/include/rigCAT.h b/src/include/rigCAT.h index c6ca1346..2cbe549e 100644 --- a/src/include/rigCAT.h +++ b/src/include/rigCAT.h @@ -1,3 +1,10 @@ +#ifndef RIGCAT_H_ +#define RIGCAT_H_ + +#ifndef RIGCATTEST +# error FIXME: file should not have been included +#endif + #include #include #include @@ -10,5 +17,4 @@ extern string xmlfname; extern void MilliSleep(long msecs); - - +#endif diff --git a/src/include/rigsupport.h b/src/include/rigsupport.h index 85bdeba4..0766e929 100644 --- a/src/include/rigsupport.h +++ b/src/include/rigsupport.h @@ -4,21 +4,14 @@ #include #include -#include -#include -#include -#include #include "serial.h" - #if USE_HAMLIB #include "hamlib.h" #endif -using namespace std; - extern Fl_Double_Window *rigcontrol; -extern string windowTitle; +extern std::string windowTitle; extern Cserial rigio; extern void initOptionMenus(); @@ -55,7 +48,7 @@ extern bool init_rigMEM_RigDialog(); #if USE_HAMLIB extern bool init_Hamlib_RigDialog(); extern void selMode(rmode_t m); -extern string modeString(rmode_t m); +extern std::string modeString(rmode_t m); #endif extern Fl_Double_Window * createRigDialog(); diff --git a/src/include/rigxml.h b/src/include/rigxml.h index 05026a2d..999ce3dd 100644 --- a/src/include/rigxml.h +++ b/src/include/rigxml.h @@ -3,10 +3,6 @@ #include #include -#include -#include -#include -#include struct MODE { std::string SYMBOL; diff --git a/src/include/ringbuffer.h b/src/include/ringbuffer.h index 0fd7eb07..143f60c5 100644 --- a/src/include/ringbuffer.h +++ b/src/include/ringbuffer.h @@ -44,7 +44,7 @@ #define RINGBUFFER_H #include -#include +#include #include "util.h" template diff --git a/src/include/rsid.h b/src/include/rsid.h index c23c226f..9e886337 100644 --- a/src/include/rsid.h +++ b/src/include/rsid.h @@ -40,18 +40,8 @@ #ifndef RSID_H #define RSID_H -#include -#include -#include -#include -#include -#include -#include - #include "globals.h" #include "modem.h" -#include "fft.h" -#include "misc.h" #define RSID_FFT_SIZE 1024 #define RSID_ARRAY_SIZE (RSID_FFT_SIZE * 2) diff --git a/src/include/rtty.h b/src/include/rtty.h index 4ec89e64..a200faf5 100644 --- a/src/include/rtty.h +++ b/src/include/rtty.h @@ -29,13 +29,9 @@ #include "complex.h" #include "modem.h" -#include "trx.h" -#include "misc.h" +#include "globals.h" #include "filters.h" #include "fftfilt.h" -#include "digiscope.h" -//#include "id.h" -#include "mbuffer.h" #define RTTY_SampleRate 8000 //#define RTTY_SampleRate 11025 diff --git a/src/include/status.h b/src/include/status.h index d0612189..e99540bf 100644 --- a/src/include/status.h +++ b/src/include/status.h @@ -37,7 +37,7 @@ struct status { bool scopeVisible; int scopeW; int scopeH; - string LastMacroFile; + std::string LastMacroFile; bool spot_recv; bool spot_log; bool contest; diff --git a/src/include/table.h b/src/include/table.h index 588bd23f..b4316530 100644 --- a/src/include/table.h +++ b/src/include/table.h @@ -26,13 +26,11 @@ #ifndef __TABLE_HH #define __TABLE_HH -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #define TABLE_WHEN_DCLICK 16 diff --git a/src/include/textio.h b/src/include/textio.h index 22130f43..109f0c31 100644 --- a/src/include/textio.h +++ b/src/include/textio.h @@ -1,10 +1,6 @@ #ifndef MULTIPSK_H #define MULTIPSK_H -#include -#include -#include - #include "qso_db.h" class cTextFile { @@ -23,4 +19,3 @@ public: }; #endif - diff --git a/src/include/thor.h b/src/include/thor.h index 6695a6a8..a1805abd 100644 --- a/src/include/thor.h +++ b/src/include/thor.h @@ -25,7 +25,8 @@ #include #include "complex.h" -#include "trx.h" +#include "modem.h" +#include "globals.h" #include "fft.h" #include "filters.h" #include "fftfilt.h" @@ -42,8 +43,6 @@ #include "viterbi.h" -using namespace std; - #define THORNUMTONES 18 #define THORMAXFFTS 8 #define THORBASEFREQ 500.0 @@ -128,7 +127,7 @@ protected: int txstate; int txprevtone; unsigned int bitshreg; - string strSecXmtText; + std::string strSecXmtText; unsigned int cptr; viterbi *Dec; diff --git a/src/include/throb.h b/src/include/throb.h index 28b99d94..150b9b05 100644 --- a/src/include/throb.h +++ b/src/include/throb.h @@ -24,8 +24,8 @@ #ifndef _THROB_H #define _THROB_H -#include "trx.h" #include "modem.h" +#include "globals.h" #include "fft.h" #include "fftfilt.h" #include "filters.h" diff --git a/src/include/trx.h b/src/include/trx.h index b5bd8e8b..9cbf359e 100644 --- a/src/include/trx.h +++ b/src/include/trx.h @@ -27,12 +27,8 @@ #include "threads.h" #include "modem.h" - -#include "misc.h" #include "sound.h" -#include "waterfall.h" #include "globals.h" -#include "fl_digi.h" #include "rsid.h" // ---------------------------------------------------------------------------- diff --git a/src/include/viewpsk.h b/src/include/viewpsk.h index 62f73bbb..d8baa4e4 100644 --- a/src/include/viewpsk.h +++ b/src/include/viewpsk.h @@ -26,9 +26,9 @@ #define _VIEWPSK_H #include "complex.h" -#include "trx.h" +#include "modem.h" +#include "globals.h" #include "filters.h" -#include "fldigi-config.h" #include "pskeval.h" //===================================================================== diff --git a/src/include/waterfall.h b/src/include/waterfall.h index 9cbd8c62..e94a21b7 100644 --- a/src/include/waterfall.h +++ b/src/include/waterfall.h @@ -22,28 +22,16 @@ #ifndef _WF_H #define _WF_H -#include -#include -#include - -#include "complex.h" -#include "fft.h" -#include "sound.h" -#include "globals.h" -#include "fldigi-config.h" - -#include -#include #include -#include +#include +#include #include #include -#include -#include -#include #include -#include -#include +#include + +#include "fft.h" +#include "fldigi-config.h" enum { WF_FFT_RECTANGULAR, WF_FFT_BLACKMAN, WF_FFT_HAMMING, @@ -62,8 +50,6 @@ enum { #define FFT_LEN 4096 #define SC_SMPLRATE 8000 - -#define fftabs(a,b) sqrt((a)*(a) + (b)*(b)) struct RGB { uchar R; @@ -93,7 +79,7 @@ enum WFmode { #define MAG_4 3 //enum WFspeed {FAST = 1, NORMAL = 2, SLOW = 8}; -enum WFspeed {FAST = 1, NORMAL = 2, SLOW = 4, PAUSE = INT_MAX}; +enum WFspeed { PAUSE = 0, FAST = 1, NORMAL = 2, SLOW = 4 }; class WFdisp : public Fl_Widget { public: @@ -180,23 +166,7 @@ public: drawMarker();}; int peakFreq(int f0, int delta); double powerDensity(double f0, double bw); - void setPrefilter(int v) { - switch (v) { - case WF_FFT_RECTANGULAR: RectWindow(fftwindow, FFT_LEN*2); break; - case WF_FFT_BLACKMAN: BlackmanWindow(fftwindow, FFT_LEN*2); break; - case WF_FFT_HAMMING: HammingWindow(fftwindow, FFT_LEN*2); break; - case WF_FFT_HANNING: HanningWindow(fftwindow, FFT_LEN*2); break; - case WF_FFT_TRIANGULAR: TriangularWindow(fftwindow, FFT_LEN*2); break; - } - prefilter = v; -// switch (v) { -// case 0: wfft->setWindow(FFT_NONE); break; -// case 1: wfft->setWindow(FFT_BLACKMAN); break; -// case 2: wfft->setWindow(FFT_HAMMING); break; -// case 3: wfft->setWindow(FFT_HANNING); break; -// case 4: wfft->setWindow(FFT_TRIANGULAR); break; -// } - } + void setPrefilter(int v); void setcolors(); double dFreq() {return dfreq;} void redrawCursor(); diff --git a/src/include/xmlreader.h b/src/include/xmlreader.h index eb887ad2..55f80906 100644 --- a/src/include/xmlreader.h +++ b/src/include/xmlreader.h @@ -1,4 +1,7 @@ -#include +#include + +#include "irrXML.h" + using namespace irr; using namespace io; @@ -15,7 +18,7 @@ public: p=0; } - IIrrXMLStringReader(const string &str) { + IIrrXMLStringReader(const std::string &str) { s=str.c_str(); len = strlen(s); p=0; diff --git a/src/logbook/adif_io.cxx b/src/logbook/adif_io.cxx index c359d73a..a60d85c2 100644 --- a/src/logbook/adif_io.cxx +++ b/src/logbook/adif_io.cxx @@ -3,8 +3,8 @@ #include #include -#include -#include +#include +#include #include "adif_io.h" #include "config.h" diff --git a/src/logbook/calendar.cxx b/src/logbook/calendar.cxx index 75ff7071..9f486731 100644 --- a/src/logbook/calendar.cxx +++ b/src/logbook/calendar.cxx @@ -1,9 +1,11 @@ #include +#include +#include +#include + #include -#include -#include -#include +#include #include "pixmaps.h" #include "calendar.h" diff --git a/src/logbook/date.cxx b/src/logbook/date.cxx index 66fd9939..5049e8bb 100644 --- a/src/logbook/date.cxx +++ b/src/logbook/date.cxx @@ -25,6 +25,10 @@ #include +#include +#include +#include + #include "date.h" using namespace std; diff --git a/src/logbook/lgbook.cxx b/src/logbook/lgbook.cxx index 7cf9c02a..8e6a8322 100644 --- a/src/logbook/lgbook.cxx +++ b/src/logbook/lgbook.cxx @@ -3,6 +3,7 @@ #include "gettext.h" #include "lgbook.h" #include +#include #include "logsupport.h" #include "pixmaps.h" diff --git a/src/logbook/lgbook.fl b/src/logbook/lgbook.fl index 6ecf4b33..4d1cff68 100644 --- a/src/logbook/lgbook.fl +++ b/src/logbook/lgbook.fl @@ -7,6 +7,8 @@ header_name {.h} code_name {.cxx} decl {\#include } {} +decl {\#include } {} + decl {\#include "logsupport.h"} {} decl {\#include "pixmaps.h"} {} diff --git a/src/logbook/logbook.cxx b/src/logbook/logbook.cxx index dba3f995..72a4b498 100644 --- a/src/logbook/logbook.cxx +++ b/src/logbook/logbook.cxx @@ -1,24 +1,15 @@ #include -#include -#include -#include -#include -#include -#include -#include +#include -#include -#include -#include -#include -#include -#include +#include #include "main.h" #include "logbook.h" #include "configuration.h" +using namespace std; + void start_logbook () { create_logbook_dialogs(); diff --git a/src/logbook/logsupport.cxx b/src/logbook/logsupport.cxx index 384e2efc..af56a348 100644 --- a/src/logbook/logsupport.cxx +++ b/src/logbook/logsupport.cxx @@ -1,14 +1,15 @@ #include -#include #include +#include +#include #include "main.h" -#include "modem.h" +#include "trx.h" #include "debug.h" #include "macros.h" #include "status.h" -#include "spot.h" +#include "date.h" #include "adif_io.h" @@ -23,6 +24,7 @@ #include "main.h" #include "locator.h" +#include #include using namespace std; diff --git a/src/logbook/table.cxx b/src/logbook/table.cxx index 999a095f..c6ef331e 100644 --- a/src/logbook/table.cxx +++ b/src/logbook/table.cxx @@ -25,6 +25,7 @@ #include +#include #include #include diff --git a/src/logbook/textio.cxx b/src/logbook/textio.cxx index ebdfb54a..671802b4 100644 --- a/src/logbook/textio.cxx +++ b/src/logbook/textio.cxx @@ -1,14 +1,16 @@ // textio.cxx #include -#include -#include -using namespace std; +#include +#include +#include #include "textio.h" #include "lgbook.h" +using namespace std; + #ifdef __CYGWIN__ static const char *szEOL = "\r\n"; #else diff --git a/src/logger/logger.cxx b/src/logger/logger.cxx index 9dbd4926..9dfc7403 100644 --- a/src/logger/logger.cxx +++ b/src/logger/logger.cxx @@ -37,6 +37,9 @@ #include "lgbook.h" #include "main.h" #include "modem.h" +#include "waterfall.h" +#include "fl_digi.h" +#include "trx.h" #include "debug.h" #include "macros.h" #include "status.h" @@ -48,6 +51,8 @@ #include +using namespace std; + //--------------------------------------------------------------------- const char *logmode; char logdate[32]; diff --git a/src/main.cxx b/src/main.cxx index 7a117093..988de563 100644 --- a/src/main.cxx +++ b/src/main.cxx @@ -33,6 +33,7 @@ # include # include #endif +#include #include #include #include @@ -45,19 +46,16 @@ #include #include #include +#include #include "gettext.h" #include "main.h" #include "waterfall.h" -#include "fft.h" +#include "trx.h" #include "soundconf.h" -#include "complex.h" #include "fl_digi.h" #include "rigio.h" #include "globals.h" -#include "psk.h" -#include "cw.h" -#include "mfsk.h" #include "confdialog.h" #include "colorsfonts.h" #include "configuration.h" diff --git a/src/mfsk/mfsk.cxx b/src/mfsk/mfsk.cxx index 64db3e10..9e1bc122 100644 --- a/src/mfsk/mfsk.cxx +++ b/src/mfsk/mfsk.cxx @@ -30,9 +30,14 @@ #include #include +#include + #include "mfsk.h" #include "modem.h" +#include "misc.h" +#include "main.h" +#include "fl_digi.h" #include "configuration.h" #include "status.h" #include "trx.h" diff --git a/src/misc/arq_io.cxx b/src/misc/arq_io.cxx index be9cb6d2..c19b732f 100644 --- a/src/misc/arq_io.cxx +++ b/src/misc/arq_io.cxx @@ -43,6 +43,7 @@ #include "main.h" #include "configuration.h" #include "fl_digi.h" +#include "trx.h" #include "arq_io.h" #include "threads.h" diff --git a/src/misc/benchmark.cxx b/src/misc/benchmark.cxx index fa0776ba..500e5f4d 100644 --- a/src/misc/benchmark.cxx +++ b/src/misc/benchmark.cxx @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -36,6 +37,7 @@ # include #endif +#include "fl_digi.h" #include "modem.h" #include "trx.h" #include "timeops.h" @@ -45,6 +47,8 @@ #include "benchmark.h" +using namespace std; + struct benchmark_params benchmark = { MODE_BPSK31, 1000, false, false, 0.0, 1.0, SRC_SINC_FASTEST }; diff --git a/src/misc/configuration.cxx b/src/misc/configuration.cxx index 16828803..024a744a 100644 --- a/src/misc/configuration.cxx +++ b/src/misc/configuration.cxx @@ -4,7 +4,7 @@ #include "confdialog.h" #include "xmlreader.h" #include "soundconf.h" -#include "waterfall.h" +#include "fl_digi.h" #include "main.h" #include "gettext.h" @@ -14,16 +14,13 @@ #endif #include "rigMEM.h" -//#include "rigio.h" #include "debug.h" #include #include - #include #include - #include #include diff --git a/src/misc/icons.cxx b/src/misc/icons.cxx index 704c50c4..75c55931 100644 --- a/src/misc/icons.cxx +++ b/src/misc/icons.cxx @@ -23,6 +23,7 @@ #include #include "icons.h" +#include #include #if USE_IMAGE_LABELS diff --git a/src/misc/lookupcall.cxx b/src/misc/lookupcall.cxx index 3aa633b9..608458b7 100644 --- a/src/misc/lookupcall.cxx +++ b/src/misc/lookupcall.cxx @@ -34,8 +34,6 @@ #include #include -#include - #include "threads.h" #include "misc.h" diff --git a/src/misc/macroedit.cxx b/src/misc/macroedit.cxx index 6baf3762..14730992 100644 --- a/src/misc/macroedit.cxx +++ b/src/misc/macroedit.cxx @@ -1,5 +1,6 @@ #include +#include #include #include #include @@ -11,8 +12,9 @@ #include "globals.h" #include "status.h" #include "fileselect.h" - -#include +#include "fl_lock.h" +#include "fl_digi.h" +#include "main.h" using namespace std; diff --git a/src/misc/macros.cxx b/src/misc/macros.cxx index 7ae5cee2..56e04388 100644 --- a/src/misc/macros.cxx +++ b/src/misc/macros.cxx @@ -12,8 +12,10 @@ #include "globals.h" #include "debug.h" #include "status.h" +#include "trx.h" #include +#include #include "fileselect.h" #include @@ -23,6 +25,8 @@ #include #include +using namespace std; + MACROTEXT macros; CONTESTCNTR contest_count; static bool TransmitON = false; @@ -655,7 +659,7 @@ void pCONT(string &s, size_t &i) expand = true; } -int MACROTEXT::loadMacros(string filename) +int MACROTEXT::loadMacros(const string& filename) { string mLine; string mName; @@ -871,7 +875,7 @@ string mtext = //\n\ "; -void MACROTEXT::saveMacros(string fname) { +void MACROTEXT::saveMacros(const string& fname) { string work; ofstream mfile(fname.c_str()); mfile << mtext; diff --git a/src/misc/misc.cxx b/src/misc/misc.cxx index 27b37cc5..934e143b 100644 --- a/src/misc/misc.cxx +++ b/src/misc/misc.cxx @@ -147,12 +147,6 @@ unsigned char graydecode(unsigned char data) // ---------------------------------------------------------------------------- -void MilliSleep(long msecs) -{ - struct timespec tv = {0, msecs * 1000000L}; - nanosleep(&tv, NULL); -} - // Rectangular - no pre filtering of data array void RectWindow(double *array, int n) { for (int i = 0; i < n; i++) diff --git a/src/misc/util.cxx b/src/misc/util.cxx index 53cacc96..d6e4c34f 100644 --- a/src/misc/util.cxx +++ b/src/misc/util.cxx @@ -170,3 +170,9 @@ const char* uint2bin(unsigned u, size_t len) return &(*binbuf)[0]; } + +void MilliSleep(long msecs) +{ + struct timespec tv = {0, msecs * 1000000L}; + nanosleep(&tv, NULL); +} diff --git a/src/mt63/mt63.cxx b/src/mt63/mt63.cxx index 8e2ec20a..38c423e8 100644 --- a/src/mt63/mt63.cxx +++ b/src/mt63/mt63.cxx @@ -25,14 +25,10 @@ #include -#include -#include - -#include -#include - -#include "mt63.h" +#include "configuration.h" +#include "fl_digi.h" #include "status.h" +#include "mt63.h" using namespace std; diff --git a/src/olivia/olivia.cxx b/src/olivia/olivia.cxx index b405a2c1..723315a3 100755 --- a/src/olivia/olivia.cxx +++ b/src/olivia/olivia.cxx @@ -31,8 +31,10 @@ #include #include "olivia.h" -#include "sound.h" +#include "modem.h" +#include "fl_digi.h" +#include "misc.h" #include "confdialog.h" #include "status.h" diff --git a/src/psk/psk.cxx b/src/psk/psk.cxx index 91cefefb..8f752074 100644 --- a/src/psk/psk.cxx +++ b/src/psk/psk.cxx @@ -33,6 +33,10 @@ #include #include "psk.h" +#include "main.h" +#include "fl_digi.h" +#include "trx.h" +#include "misc.h" #include "waterfall.h" #include "configuration.h" #include "status.h" diff --git a/src/psk/pskeval.cxx b/src/psk/pskeval.cxx index 2a4c33d5..3c8e69d1 100644 --- a/src/psk/pskeval.cxx +++ b/src/psk/pskeval.cxx @@ -21,9 +21,9 @@ // along with fldigi; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // ---------------------------------------------------------------------------- -#include #include +#include "fl_digi.h" #include "pskeval.h" using namespace std; diff --git a/src/psk/viewpsk.cxx b/src/psk/viewpsk.cxx index e0b0aaf5..081f9a59 100644 --- a/src/psk/viewpsk.cxx +++ b/src/psk/viewpsk.cxx @@ -37,7 +37,7 @@ #include "pskeval.h" #include "pskcoeff.h" #include "pskvaricode.h" -#include "waterfall.h" +#include "misc.h" #include "configuration.h" #include "Viewer.h" #include "qrunner.h" diff --git a/src/rigcontrol/hamlib.cxx b/src/rigcontrol/hamlib.cxx index fabf2f3b..a8162ea6 100644 --- a/src/rigcontrol/hamlib.cxx +++ b/src/rigcontrol/hamlib.cxx @@ -2,18 +2,14 @@ // hamlib.cxx -- Hamlib (rig control) interface for fldigi #include -#include -#include -#include -#include -#include #include #include #include +#include +#include "trx.h" #include "configuration.h" #include "confdialog.h" -#include #include "rigclass.h" diff --git a/src/rigcontrol/ptt.cxx b/src/rigcontrol/ptt.cxx index 5a0bfa18..04f0bbb7 100644 --- a/src/rigcontrol/ptt.cxx +++ b/src/rigcontrol/ptt.cxx @@ -42,6 +42,7 @@ #include #include +#include "trx.h" #include "ptt.h" #include "configuration.h" #include "rigMEM.h" diff --git a/src/rigcontrol/rigMEM.cxx b/src/rigcontrol/rigMEM.cxx index 6dbb0cf2..10341146 100644 --- a/src/rigcontrol/rigMEM.cxx +++ b/src/rigcontrol/rigMEM.cxx @@ -23,11 +23,14 @@ #include "rigMEM.h" #include "fl_digi.h" #include "main.h" +#include "trx.h" #include "rigsupport.h" #include "rigdialog.h" #include "debug.h" +using namespace std; + LOG_SET_SOURCE(debug::LOG_RIGCONTROL); /* ---------------------------------------------------------------------- */ diff --git a/src/rigcontrol/rigio.cxx b/src/rigcontrol/rigio.cxx index 66178b05..d978b9be 100644 --- a/src/rigcontrol/rigio.cxx +++ b/src/rigcontrol/rigio.cxx @@ -25,6 +25,7 @@ #include "rigsupport.h" #include "rigdialog.h" #include "rigxml.h" +#include "trx.h" #include "serial.h" #include "rigio.h" #include "debug.h" diff --git a/src/rigcontrol/rigsupport.cxx b/src/rigcontrol/rigsupport.cxx index 5fbfea69..7175806a 100644 --- a/src/rigcontrol/rigsupport.cxx +++ b/src/rigcontrol/rigsupport.cxx @@ -11,7 +11,9 @@ #include #include +#include #include +#include #include #include #include @@ -25,6 +27,8 @@ #include "threads.h" #include "main.h" +#include "fl_digi.h" +#include "trx.h" #include "configuration.h" diff --git a/src/rigcontrol/rigxml.cxx b/src/rigcontrol/rigxml.cxx index 07c8af64..6a50c8f1 100644 --- a/src/rigcontrol/rigxml.cxx +++ b/src/rigcontrol/rigxml.cxx @@ -11,6 +11,10 @@ #include #include +#include +#include + +#include #include "rigio.h" #include "rigxml.h" @@ -26,6 +30,8 @@ #include "fileselect.h" #include "confdialog.h" +using namespace std; + //#define DEBUGXML void parseRIGDEF(size_t &); diff --git a/src/rsid/rsid.cxx b/src/rsid/rsid.cxx index f450ef10..ca6ca162 100644 --- a/src/rsid/rsid.cxx +++ b/src/rsid/rsid.cxx @@ -1,11 +1,14 @@ #include -#include +#include +#include #include "rsid.h" #include "filters.h" -#include "main.h" +#include "fft.h" +#include "misc.h" #include "trx.h" +#include "fl_digi.h" #include "configuration.h" #include "confdialog.h" #include "qrunner.h" diff --git a/src/soundcard/sound.cxx b/src/soundcard/sound.cxx index a9fc1438..4ade018b 100644 --- a/src/soundcard/sound.cxx +++ b/src/soundcard/sound.cxx @@ -36,8 +36,9 @@ #include #include -#include +#include #include +#include #include #include @@ -59,12 +60,15 @@ #include "configuration.h" #include "status.h" #include "fileselect.h" - -#include "threads.h" +#include "trx.h" +#include "fl_digi.h" +#include "threads.h" #include "timeops.h" #include "ringbuffer.h" #include "debug.h" +using namespace std; + LOG_SET_SOURCE(debug::LOG_AUDIO); // Define these constants here to avoid littering the code with magic numbers. diff --git a/src/soundcard/soundconf.cxx b/src/soundcard/soundconf.cxx index 76652e34..77763f8d 100644 --- a/src/soundcard/soundconf.cxx +++ b/src/soundcard/soundconf.cxx @@ -7,6 +7,7 @@ #include #include +#include #include "soundconf.h" #include "sound.h" diff --git a/src/spot/pskrep.cxx b/src/spot/pskrep.cxx index 15c75300..ecbd1ae0 100644 --- a/src/spot/pskrep.cxx +++ b/src/spot/pskrep.cxx @@ -49,7 +49,8 @@ #include "debug.h" #include "util.h" #include "trx.h" -#include "waterfall.h" +#include "fl_digi.h" +#include "main.h" #include "configuration.h" #include "globals.h" #include "spot.h" diff --git a/src/thor/thor.cxx b/src/thor/thor.cxx index e1f854ea..a3134826 100644 --- a/src/thor/thor.cxx +++ b/src/thor/thor.cxx @@ -30,6 +30,7 @@ #include "thor.h" #include "trx.h" +#include "fl_digi.h" #include "fft.h" #include "filters.h" #include "misc.h" diff --git a/src/throb/throb.cxx b/src/throb/throb.cxx index eec30e81..6bb8d511 100644 --- a/src/throb/throb.cxx +++ b/src/throb/throb.cxx @@ -33,6 +33,7 @@ #include "throb.h" #include "ascii.h" #include "configuration.h" +#include "fl_digi.h" #include "status.h" #undef CLAMP diff --git a/src/trx/modem.cxx b/src/trx/modem.cxx index 23908d17..4b4a062c 100644 --- a/src/trx/modem.cxx +++ b/src/trx/modem.cxx @@ -3,17 +3,26 @@ #include +#include + +#include "misc.h" #include "filters.h" #include "confdialog.h" #include "modem.h" +#include "trx.h" +#include "fl_digi.h" +#include "main.h" #include "configuration.h" - +#include "waterfall.h" #include "qrunner.h" +#include "mbuffer.h" #include "status.h" #include "debug.h" +using namespace std; + modem *cw_modem = 0; modem *mfsk8_modem = 0; diff --git a/src/trx/trx.cxx b/src/trx/trx.cxx index 4a07b97e..f2b0c24c 100644 --- a/src/trx/trx.cxx +++ b/src/trx/trx.cxx @@ -25,7 +25,7 @@ #include #include - +#include #include #include "trx.h" diff --git a/src/waterfall/colorbox.cxx b/src/waterfall/colorbox.cxx index e0c6d982..f24236d4 100644 --- a/src/waterfall/colorbox.cxx +++ b/src/waterfall/colorbox.cxx @@ -1,16 +1,18 @@ #include +#include +#include + #include "colorbox.h" #include "waterfall.h" #include "confdialog.h" -#include -#include - -using namespace std; - +#include "main.h" +#include "fl_digi.h" #include "fileselect.h" #include "debug.h" +using namespace std; + void colorbox::draw() { int ypos = y() + 2; int xpos; diff --git a/src/waterfall/digiscope.cxx b/src/waterfall/digiscope.cxx index 6eff8e20..2d8a61eb 100644 --- a/src/waterfall/digiscope.cxx +++ b/src/waterfall/digiscope.cxx @@ -27,11 +27,18 @@ // ---------------------------------------------------------------------------- #include + #include +#include +#include + +#include +#include #include "digiscope.h" #include "modem.h" #include "trx.h" +#include "fl_digi.h" #include "qrunner.h" diff --git a/src/waterfall/raster.cxx b/src/waterfall/raster.cxx index f5c61184..0f58e7fd 100644 --- a/src/waterfall/raster.cxx +++ b/src/waterfall/raster.cxx @@ -23,12 +23,13 @@ #include +#include + #include "raster.h" #include "modem.h" -#include -#include -#include +#include +#include #include "raster.h" #include "qrunner.h" diff --git a/src/waterfall/waterfall.cxx b/src/waterfall/waterfall.cxx index eea45235..edff30d3 100644 --- a/src/waterfall/waterfall.cxx +++ b/src/waterfall/waterfall.cxx @@ -33,8 +33,21 @@ #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "fl_digi.h" +#include "trx.h" +#include "misc.h" #include "waterfall.h" -#include "threads.h" #include "main.h" #include "modem.h" #include "qrunner.h" @@ -53,6 +66,8 @@ #include "confdialog.h" #include "gettext.h" +using namespace std; + #define bwFFT 30 #define cwRef 50 #define bwX1 25 @@ -353,6 +368,18 @@ double WFdisp::powerDensity(double f0, double bw) return pwrdensity/(bw+1); } +void WFdisp::setPrefilter(int v) +{ + switch (v) { + case WF_FFT_RECTANGULAR: RectWindow(fftwindow, FFT_LEN*2); break; + case WF_FFT_BLACKMAN: BlackmanWindow(fftwindow, FFT_LEN*2); break; + case WF_FFT_HAMMING: HammingWindow(fftwindow, FFT_LEN*2); break; + case WF_FFT_HANNING: HanningWindow(fftwindow, FFT_LEN*2); break; + case WF_FFT_TRIANGULAR: TriangularWindow(fftwindow, FFT_LEN*2); break; + } + prefilter = v; +} + int WFdisp::log2disp(int v) { double val = 255.0 * (reflevel- v) / ampspan; diff --git a/src/widgets/FTextView.cxx b/src/widgets/FTextView.cxx index c5e0a975..9525b4d0 100644 --- a/src/widgets/FTextView.cxx +++ b/src/widgets/FTextView.cxx @@ -28,17 +28,21 @@ #include #include #include +#include #include +#include #include #include +#include #include #include "FTextView.h" #include "main.h" - +#include "trx.h" #include "macros.h" #include "main.h" +#include "fl_digi.h" #include "cw.h" diff --git a/src/widgets/picture.cxx b/src/widgets/picture.cxx index 3ad8cad4..c8bc5ed7 100644 --- a/src/widgets/picture.cxx +++ b/src/widgets/picture.cxx @@ -25,10 +25,16 @@ #include +#include +#include +#include +#include + #include #include -#include +#include +#include #if USE_LIBJPEG # include @@ -38,6 +44,7 @@ # include #endif +#include "fl_lock.h" #include "picture.h" #include "debug.h" diff --git a/src/wwv/analysis.cxx b/src/wwv/analysis.cxx index 1adb0c02..6bcac7e4 100644 --- a/src/wwv/analysis.cxx +++ b/src/wwv/analysis.cxx @@ -23,10 +23,22 @@ #include +#include +#include +#include +#include + #include "analysis.h" +#include "modem.h" +#include "misc.h" +#include "filters.h" +#include "fftfilt.h" +#include "digiscope.h" #include "waterfall.h" -#include "confdialog.h" -#include "configuration.h" +#include "main.h" +#include "fl_digi.h" + +using namespace std; #define anal_BW 4