kopia lustrzana https://github.com/jamescoxon/dl-fldigi
Upstream version 1.35o
rodzic
dcf89d5323
commit
a140f84608
34
makefile
34
makefile
|
@ -9,8 +9,8 @@ CTARG = hamlib
|
|||
ifneq (,$(findstring hamlib-debug, $(CFG)))
|
||||
override CTARG = hamlib-debug
|
||||
endif
|
||||
ifneq (,$(findstring hamlib-local, $(CFG)))
|
||||
override CTARG = hamlib-local
|
||||
ifneq (,$(findstring hamlib-static, $(CFG)))
|
||||
override CTARG = hamlib-static
|
||||
endif
|
||||
ifneq (,$(findstring nhl, $(CFG)))
|
||||
override CTARG = nhl
|
||||
|
@ -18,8 +18,14 @@ endif
|
|||
ifneq (,$(findstring nhl-debug, $(CFG)))
|
||||
override CTARG = nhl-debug
|
||||
endif
|
||||
ifneq (,$(findstring nhl-local, $(CFG)))
|
||||
override CTARG = nhl-local
|
||||
ifneq (,$(findstring nhl-static, $(CFG)))
|
||||
override CTARG = nhl-static
|
||||
endif
|
||||
ifneq (,$(findstring emcomm, $(CFG)))
|
||||
override CTARG = emcomm
|
||||
endif
|
||||
ifneq (,$(findstring nhl-emcomm, $(CFG)))
|
||||
override CTARG = nhl-emcomm
|
||||
endif
|
||||
|
||||
#PROJECT = fldigi
|
||||
|
@ -125,7 +131,7 @@ $(TARGET): print_header directories $(SRC_OBJS) $(HAMLIB_OBJS)
|
|||
$(CC) -s -o $(OUTPUT_DIR)/$(TARGET) $(SRC_OBJS) $(HAMLIB_OBJS) $(LDFLAGS) $(HAMLIBS)
|
||||
endif
|
||||
|
||||
ifeq ($(CTARG),hamlib-local)
|
||||
ifeq ($(CTARG),hamlib-static)
|
||||
CFLAGS = $(CCFLAGS) -DPORTAUDIO
|
||||
LDFLAGS = $(STATIC_LDFLAGS) \
|
||||
/usr/local/lib/libportaudiocpp.a /usr/local/lib/libportaudio.a /usr/local/lib/libsndfile.a
|
||||
|
@ -133,6 +139,14 @@ $(TARGET): print_header directories $(SRC_OBJS) $(HAMLIB_OBJS)
|
|||
$(CC) -s -o $(OUTPUT_DIR)/$(TARGET) $(SRC_OBJS) $(HAMLIB_OBJS) $(LDFLAGS) $(HAMLIBS) $(IMGLIBS)
|
||||
endif
|
||||
|
||||
ifeq ($(CTARG),emcomm)
|
||||
CFLAGS = $(CCFLAGS) -DPORTAUDIO -DEMCOMM
|
||||
LDFLAGS = $(STATIC_LDFLAGS) \
|
||||
/usr/local/lib/libportaudiocpp.a /usr/local/lib/libportaudio.a /usr/local/lib/libsndfile.a
|
||||
$(TARGET): print_header directories $(SRC_OBJS) $(HAMLIB_OBJS)
|
||||
$(CC) -s -o $(OUTPUT_DIR)/$(TARGET) $(SRC_OBJS) $(HAMLIB_OBJS) $(LDFLAGS) $(HAMLIBS) $(IMGLIBS)
|
||||
endif
|
||||
|
||||
ifeq ($(CTARG),hamlib-debug)
|
||||
CFLAGS = $(CCFLAGS) -g -DPORTAUDIO
|
||||
LDFLAGS = $(DYN_LDFLAGS) -lportaudiocpp -lportaudio -lsndfile
|
||||
|
@ -148,7 +162,7 @@ $(TARGET): print_header directories $(SRC_OBJS)
|
|||
$(CC) -s -o $(OUTPUT_DIR)/$(TARGET) $(SRC_OBJS) $(LDFLAGS)
|
||||
endif
|
||||
|
||||
ifeq ($(CTARG),nhl-local)
|
||||
ifeq ($(CTARG),nhl-static)
|
||||
CFLAGS = $(CCFLAGS) -DNOHAMLIB -DPORTAUDIO
|
||||
LDFLAGS = $(STATIC_LDFLAGS) \
|
||||
/usr/local/lib/libportaudiocpp.a /usr/local/lib/libportaudio.a /usr/local/lib/libsndfile.a
|
||||
|
@ -163,6 +177,14 @@ $(TARGET): print_header directories $(SRC_OBJS)
|
|||
$(CC) -o $(OUTPUT_DIR)/$(TARGET) $(SRC_OBJS) $(LDFLAGS)
|
||||
endif
|
||||
|
||||
ifeq ($(CTARG),nhl-emcomm)
|
||||
CFLAGS = $(CCFLAGS) -DNOHAMLIB -DPORTAUDIO -DEMCOMM
|
||||
LDFLAGS = $(STATIC_LDFLAGS) \
|
||||
/usr/local/lib/libportaudiocpp.a /usr/local/lib/libportaudio.a /usr/local/lib/libsndfile.a
|
||||
$(TARGET): print_header directories $(SRC_OBJS)
|
||||
$(CC) -s -o $(OUTPUT_DIR)/$(TARGET) $(SRC_OBJS) $(LDFLAGS) $(IMGLIBS)
|
||||
endif
|
||||
|
||||
clean:
|
||||
@echo Deleting intermediate files for fldigi
|
||||
-@rm -rf $(OBJ_DIR)
|
||||
|
|
|
@ -102,7 +102,7 @@ void popbrwsr_cb (Fl_Widget *v, long d)
|
|||
}
|
||||
|
||||
/* XPM Select_Browser Label */
|
||||
static char *brws_12[] = {
|
||||
static const char *brws_12[] = {
|
||||
/* width height num_colors chars_per_pixel */
|
||||
" 12 12 3 1",
|
||||
/* colors */
|
||||
|
@ -161,7 +161,7 @@ void btnComboBox_cb (Fl_Widget *v, void *d)
|
|||
}
|
||||
|
||||
|
||||
Fl_ComboBox::Fl_ComboBox (int X,int Y,int W,int H, char *L)
|
||||
Fl_ComboBox::Fl_ComboBox (int X,int Y,int W,int H, const char *L)
|
||||
: Fl_Group (X, Y, W, H, L)
|
||||
{
|
||||
width = W; height = H;
|
||||
|
|
18
src/config.h
18
src/config.h
|
@ -42,17 +42,18 @@
|
|||
#define BTN_HEIGHT 20
|
||||
|
||||
// use the following for EmComm minimal footprint
|
||||
//#define Hwfall 120
|
||||
//#define WMINIMUM (Hwfall + 580)
|
||||
//#define HNOM 450 // do not make smaller than 400
|
||||
//#define WNOM WMINIMUM
|
||||
|
||||
#ifdef EMCOMM
|
||||
#define Hwfall 120
|
||||
#define WMINIMUM (Hwfall + 580)
|
||||
#define HNOM 400 // do not make smaller than 400
|
||||
#define WNOM WMINIMUM
|
||||
#else
|
||||
// use the following for the original fldigi waterfall sizing
|
||||
#define Hwfall 140
|
||||
#define WMINIMUM (IMAGE_WIDTH / 4 + Hwfall - BTN_HEIGHT)
|
||||
#define HNOM 570
|
||||
#define WNOM WMINIMUM
|
||||
|
||||
#endif
|
||||
|
||||
#define bwColor 30
|
||||
#define bwFFT 30
|
||||
|
@ -75,8 +76,9 @@
|
|||
#define Hmacros 22
|
||||
|
||||
#define Htext (HNOM - 4 - Hwfall - Hmenu - Hstatus - Hmacros - Hqsoframe - Hnotes)
|
||||
#define Hxmttxt (Htext) / 4
|
||||
#define Hrcvtxt (Htext - (Hxmttxt))
|
||||
// Htext = HNOM - 140 - Hwfall
|
||||
#define Hrcvtxt (Htext) / 2
|
||||
#define Hxmttxt (Htext - (Hrcvtxt))
|
||||
|
||||
#define Wwfall (WNOM - Hwfall + BTN_HEIGHT + 2 * BEZEL)
|
||||
#define Wmode 80
|
||||
|
|
|
@ -261,7 +261,7 @@ int cw::rx_process(double *buf, int len)
|
|||
complex z;
|
||||
double delta;
|
||||
double value;
|
||||
char *c;
|
||||
const char *c;
|
||||
|
||||
// check if user changed filter bandwidth
|
||||
if (bandwidth != progdefaults.CWbandwidth) {
|
||||
|
@ -349,7 +349,7 @@ int cw::usec_diff(unsigned int earlier, unsigned int later)
|
|||
// If there is no data ready, CW_ERROR is returned.
|
||||
//=======================================================================
|
||||
|
||||
int cw::handle_event(int cw_event, char **c)
|
||||
int cw::handle_event(int cw_event, const char **c)
|
||||
{
|
||||
static int space_sent = true; // for word space logic
|
||||
static int last_element = 0; // length of last dot/dash
|
||||
|
|
|
@ -139,10 +139,10 @@ static CW_TABLE cw_table[] = {
|
|||
* is viewable as an integer in the range 2 (".") to 255 ("-------"), and can
|
||||
* be used as an index into a fast lookup array.
|
||||
*/
|
||||
unsigned int morse::tokenize_representation(char *representation)
|
||||
unsigned int morse::tokenize_representation(const char *representation)
|
||||
{
|
||||
unsigned int token; /* Return token value */
|
||||
char *sptr; /* Pointer through string */
|
||||
const char *sptr; /* Pointer through string */
|
||||
|
||||
/*
|
||||
* Our algorithm can handle only 6 characters of representation.
|
||||
|
@ -182,7 +182,7 @@ bool morse::init()
|
|||
{
|
||||
CW_TABLE *cw; /* Pointer to table entry */
|
||||
unsigned int i;
|
||||
char *p;
|
||||
const char *p;
|
||||
long code;
|
||||
int len;
|
||||
|
||||
|
@ -222,7 +222,7 @@ bool morse::init()
|
|||
return true;
|
||||
}
|
||||
|
||||
char *morse::rx_lookup(char *r)
|
||||
const char *morse::rx_lookup(char *r)
|
||||
{
|
||||
static char chr[2]; /* FIXME */
|
||||
int token;
|
||||
|
|
|
@ -891,14 +891,14 @@ static void cb_btnSaveConfig(Fl_Button*, void*) {
|
|||
|
||||
Fl_Double_Window* ConfigureDialog() {
|
||||
Fl_Double_Window* w;
|
||||
static char *szShifts = "23|85|160|170|182|200|240|350|425|850";
|
||||
static char *szBauds = "45|45.45|50|56|75|100|110|150|200|300";
|
||||
static char *szSelBits = "5 (baudot)|7 (ascii)|8 (ascii)";
|
||||
static char *szParity = "none|even|odd|zero|one";
|
||||
static char *szStopBits = "1|1.5|2";
|
||||
static char *szOliviaTones = "2|4|8|16|32|64|128|256";
|
||||
static char *szOliviaBandwidth = "125|250|500|1000|2000";
|
||||
static char *szBaudRates = "300|600|1200|2400|4800|9600|19200|38400|57600|115200|230400|460800";
|
||||
static const char szShifts[] = "23|85|160|170|182|200|240|350|425|850";
|
||||
static const char szBauds[] = "45|45.45|50|56|75|100|110|150|200|300";
|
||||
static const char szSelBits[] = "5 (baudot)|7 (ascii)|8 (ascii)";
|
||||
static const char szParity[] = "none|even|odd|zero|one";
|
||||
static const char szStopBits[] = "1|1.5|2";
|
||||
static const char szOliviaTones[] = "2|4|8|16|32|64|128|256";
|
||||
static const char szOliviaBandwidth[] = "125|250|500|1000|2000";
|
||||
static const char szBaudRates[] = "300|600|1200|2400|4800|9600|19200|38400|57600|115200|230400|460800";
|
||||
{ Fl_Double_Window* o = new Fl_Double_Window(400, 255, "fldigi - config");
|
||||
w = o;
|
||||
o->color(FL_DARK2);
|
||||
|
|
|
@ -20,14 +20,14 @@ decl {Fl_Double_Window *dlgConfig;} {public
|
|||
|
||||
Function {ConfigureDialog()} {open
|
||||
} {
|
||||
code {static char *szShifts = "23|85|160|170|182|200|240|350|425|850";
|
||||
static char *szBauds = "45|45.45|50|56|75|100|110|150|200|300";
|
||||
static char *szSelBits = "5 (baudot)|7 (ascii)|8 (ascii)";
|
||||
static char *szParity = "none|even|odd|zero|one";
|
||||
static char *szStopBits = "1|1.5|2";
|
||||
static char *szOliviaTones = "2|4|8|16|32|64|128|256";
|
||||
static char *szOliviaBandwidth = "125|250|500|1000|2000";
|
||||
static char *szBaudRates = "300|600|1200|2400|4800|9600|19200|38400|57600|115200|230400|460800";} {}
|
||||
code {static const char szShifts[] = "23|85|160|170|182|200|240|350|425|850";
|
||||
static const char szBauds[] = "45|45.45|50|56|75|100|110|150|200|300";
|
||||
static const char szSelBits[] = "5 (baudot)|7 (ascii)|8 (ascii)";
|
||||
static const char szParity[] = "none|even|odd|zero|one";
|
||||
static const char szStopBits[] = "1|1.5|2";
|
||||
static const char szOliviaTones[] = "2|4|8|16|32|64|128|256";
|
||||
static const char szOliviaBandwidth[] = "125|250|500|1000|2000";
|
||||
static const char szBaudRates[] = "300|600|1200|2400|4800|9600|19200|38400|57600|115200|230400|460800";} {}
|
||||
code {} {}
|
||||
Fl_Window {} {
|
||||
label {fldigi - config} open
|
||||
|
|
Plik diff jest za duży
Load Diff
|
@ -926,7 +926,7 @@ void cb_XmtMixer(Fl_Widget *w, void *d)
|
|||
|
||||
|
||||
// XPM Calendar Label
|
||||
static char *cal_16[] = {
|
||||
static const char *cal_16[] = {
|
||||
// width height num_colors chars_per_pixel
|
||||
" 15 14 3 1",
|
||||
// colors
|
||||
|
@ -1135,19 +1135,23 @@ void create_fl_digi_main() {
|
|||
valXmtMixer->deactivate();
|
||||
MixerFrame->end();
|
||||
|
||||
Fl_Tile *TiledGroup = new Fl_Tile(sw, Y, WNOM-sw, Hrcvtxt + Hxmttxt);
|
||||
// Fl_Group *TiledGroup = new Fl_Group(sw, Y, WNOM-sw, Hrcvtxt + Hxmttxt);
|
||||
Fl_Box *minbox = new Fl_Box(sw,Y + 66, WNOM-sw, Hxmttxt + Hrcvtxt - 66 - 32);
|
||||
Fl_Tile *TiledGroup = new Fl_Tile(sw, Y, WNOM-sw, Htext);
|
||||
int minRxHeight = Hrcvtxt;
|
||||
int minTxHeight;
|
||||
if (minRxHeight < 66) minRxHeight = 66;
|
||||
minTxHeight = Htext - minRxHeight;
|
||||
|
||||
Fl_Box *minbox = new Fl_Box(sw,Y + 66, WNOM-sw, Htext - 66 - 32);
|
||||
minbox->hide();
|
||||
|
||||
ReceiveText = new TextView(sw, Y, WNOM-sw, Hrcvtxt, "");
|
||||
ReceiveText = new TextView(sw, Y, WNOM-sw, minRxHeight, "");
|
||||
|
||||
FHdisp = new Raster(sw, Y, WNOM-sw, Hrcvtxt);
|
||||
FHdisp = new Raster(sw, Y, WNOM-sw, minRxHeight);
|
||||
FHdisp->hide();
|
||||
Y += Hrcvtxt;
|
||||
Y += minRxHeight;
|
||||
|
||||
TransmitText = new TextEdit(sw, Y, WNOM-sw, Hxmttxt);
|
||||
Y += Hxmttxt;
|
||||
TransmitText = new TextEdit(sw, Y, WNOM-sw, minTxHeight);
|
||||
Y += minTxHeight;
|
||||
|
||||
TiledGroup->resizable(minbox);
|
||||
TiledGroup->end();
|
||||
|
@ -1182,19 +1186,19 @@ void create_fl_digi_main() {
|
|||
wfpack->type(1);
|
||||
wf = new waterfall(0, Y, Wwfall, Hwfall);
|
||||
wf->end();
|
||||
Fl_Pack *ypack = new Fl_Pack(WNOM-(Hwfall-22), Y, Hwfall-22, Hwfall);
|
||||
Fl_Pack *ypack = new Fl_Pack(WNOM-(Hwfall-24), Y, Hwfall-24, Hwfall);
|
||||
ypack->type(0);
|
||||
|
||||
digiscope = new Digiscope (WNOM-(Hwfall-22), Y, Hwfall-22, Hwfall-22);
|
||||
digiscope = new Digiscope (WNOM-(Hwfall-24), Y, Hwfall-24, Hwfall-24);
|
||||
|
||||
pgrsSquelch = new Fl_Progress(
|
||||
WNOM-(Hwfall-22), Y + Hwfall - 22,
|
||||
Hwfall - 22, 10, "");
|
||||
WNOM-(Hwfall-24), Y + Hwfall - 24,
|
||||
Hwfall - 24, 12, "");
|
||||
pgrsSquelch->color(FL_BACKGROUND2_COLOR, FL_DARK_GREEN);
|
||||
sldrSquelch = new Fl_Slider(
|
||||
FL_HOR_NICE_SLIDER,
|
||||
WNOM-(Hwfall-22), Y + Hwfall - 12,
|
||||
Hwfall - 22, 12, "");
|
||||
WNOM-(Hwfall-24), Y + Hwfall - 12,
|
||||
Hwfall - 24, 12, "");
|
||||
|
||||
sldrSquelch->minimum(0);
|
||||
sldrSquelch->maximum(100);
|
||||
|
@ -1316,7 +1320,7 @@ void set_video(double *data, int len)
|
|||
void put_rx_char(unsigned int data)
|
||||
{
|
||||
static bool nulinepending = false;
|
||||
char **asc = ascii;
|
||||
const char **asc = ascii;
|
||||
if (mailclient || mailserver)
|
||||
asc = ascii2;
|
||||
|
||||
|
@ -1354,7 +1358,7 @@ void put_sec_char( char chr )
|
|||
}
|
||||
}
|
||||
|
||||
void put_status(char *msg)
|
||||
void put_status(const char *msg)
|
||||
{
|
||||
if (!msg) return;
|
||||
Fl::lock();
|
||||
|
@ -1475,7 +1479,7 @@ char get_tx_char(void)
|
|||
void put_echo_char(unsigned int data)
|
||||
{
|
||||
static bool nulinepending = false;
|
||||
char **asc = ascii;
|
||||
const char **asc = ascii;
|
||||
if (mailclient || mailserver)
|
||||
asc = ascii2;
|
||||
if (data == '\r' && nulinepending) // reject multiple CRs
|
||||
|
|
|
@ -113,7 +113,7 @@ void cb_FontName_Selected(Fl_Widget*, void*frmWid)
|
|||
ft->FontNameSelect();
|
||||
}
|
||||
|
||||
Font_Browser::Font_Browser(char *lbl ) :
|
||||
Font_Browser::Font_Browser(const char *lbl ) :
|
||||
Fl_Window(100,100, 400, 225, lbl)
|
||||
{
|
||||
txt_OutputFont = new Fl_Output(5, 15, 280, 22, "Font:");
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include "globals.h"
|
||||
|
||||
char *mode_names[] = {
|
||||
const char *mode_names[] = {
|
||||
"MFSK16",
|
||||
"MFSK-8",
|
||||
"OLIVIA",
|
||||
|
@ -57,7 +57,7 @@ char *mode_names[] = {
|
|||
"ANALYSIS"
|
||||
};
|
||||
|
||||
char *state_names[] = {
|
||||
const char *state_names[] = {
|
||||
"PAUSED",
|
||||
"RECEIVE",
|
||||
"TRANSMIT",
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
class cFreqControl : public Fl_Group {
|
||||
friend void cbSelectDigit (Fl_Widget *btn, void * nbr);
|
||||
public:
|
||||
cFreqControl(int x, int y, int w, int h, char *lbl = "7");
|
||||
cFreqControl(int x, int y, int w, int h, const char *lbl = "7");
|
||||
~cFreqControl();
|
||||
void updatevalue();
|
||||
void value(long lv);
|
||||
|
@ -72,7 +72,7 @@ public:
|
|||
void setCallBack (int (*cbf)() ){ cbFunc = cbf;};
|
||||
private:
|
||||
Fl_Button *Digit[MAX_DIGITS];
|
||||
static char *Label[];
|
||||
static const char *Label[];
|
||||
int mult[MAX_DIGITS];
|
||||
Fl_Box *decbx;
|
||||
Fl_Color OFFCOLOR;
|
||||
|
|
|
@ -14,12 +14,12 @@
|
|||
//
|
||||
// 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
|
||||
// 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
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#ifndef _TextView_H
|
||||
|
@ -31,121 +31,126 @@
|
|||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
#include "threads.h"
|
||||
|
||||
/* fltk includes */
|
||||
#include <FL/Fl.H>
|
||||
#include <FL/fl_draw.H>
|
||||
#include <FL/Fl_Widget.H>
|
||||
#include <FL/Fl_Scrollbar.H>
|
||||
#include <FL/Enumerations.H>
|
||||
#include <FL/Fl_Menu_Button.H>
|
||||
#include <FL/Fl_Menu_Item.H>
|
||||
#include <FL/Fl_Text_Display.H>
|
||||
#include <FL/Fl_Text_Editor.H>
|
||||
|
||||
using namespace std;
|
||||
|
||||
class textview : public Fl_Widget
|
||||
class TextView : public Fl_Text_Display
|
||||
{
|
||||
public:
|
||||
enum TV_ATTR {RCV, XMT};
|
||||
enum CURSOR_TYPE {CARET_CURSOR, NORMAL_CURSOR, HEAVY_CURSOR, DIM_CURSOR, BLOCK_CURSOR};
|
||||
protected:
|
||||
string buff;
|
||||
string attr;
|
||||
int nlines;
|
||||
int wrappos;
|
||||
int charwidth;
|
||||
int maxcharwidth;
|
||||
int charheight;
|
||||
int cursorX;
|
||||
int cursorY;
|
||||
int startidx;
|
||||
int popx;
|
||||
int popy;
|
||||
bool cursorON;
|
||||
bool wordwrap;
|
||||
CURSOR_TYPE cursorStyle;
|
||||
Fl_Font TextFont;
|
||||
Fl_Color TextColor[16];
|
||||
int TextSize;
|
||||
TextView(int x, int y, int w, int h, const char *l = 0);
|
||||
~TextView();
|
||||
|
||||
int handle(int event);
|
||||
void add(char c, int attr = 0);
|
||||
void add(const char *s, int attr = 0);
|
||||
void clear(void);
|
||||
|
||||
void Show(void) { show(); }
|
||||
void Hide(void) { hide(); }
|
||||
void setFont(Fl_Font f) { setFont(-1, f); }
|
||||
void setFontSize(int s) { setFontSize(-1, s); }
|
||||
void setFontColor(Fl_Color c) { setFontColor(-1, c); }
|
||||
void setFont(int n, Fl_Font f);
|
||||
void setFontSize(int n, int s);
|
||||
void setFontColor(int n, Fl_Color c);
|
||||
|
||||
public:
|
||||
|
||||
textview( int x, int y, int w, int h, const char *label = 0 );
|
||||
virtual ~textview() = 0;
|
||||
virtual int handle(int event);
|
||||
virtual void resize( int x, int y, int w, int h );
|
||||
void draw_cursor();
|
||||
virtual void draw();
|
||||
void Show();
|
||||
void Hide();
|
||||
|
||||
virtual void add( char *text, int attr = 1 );
|
||||
virtual void add( char c, int attr = 1);
|
||||
virtual void clear();
|
||||
virtual string findtext();
|
||||
|
||||
virtual void setFont(Fl_Font fnt);
|
||||
virtual void setFontSize(int siz);
|
||||
virtual void setFontColor(Fl_Color clr);
|
||||
|
||||
inline void setTextStyle(int n, Fl_Color c )
|
||||
{ if (n < 0 || n > 15) return;
|
||||
TextColor[n] = c;
|
||||
}
|
||||
enum TV_ATTR {RCV, XMT};
|
||||
enum { NSTYLES = 16 };
|
||||
|
||||
protected:
|
||||
Fl_Scrollbar *scrollbar;
|
||||
Fl_Menu_Button *mpopup;
|
||||
|
||||
void scrollbarCB();
|
||||
inline static void _scrollbarCB( Fl_Widget* w, void* arg )
|
||||
{
|
||||
((textview*)arg)->scrollbarCB();
|
||||
}
|
||||
|
||||
int lineCount();
|
||||
void _backspace();
|
||||
void _add(char c, int attribute);
|
||||
void setScrollbar();
|
||||
};
|
||||
|
||||
|
||||
class TextView : public textview {
|
||||
public:
|
||||
TextView( int x, int y, int w, int h, const char *label = 0 );
|
||||
virtual void add( char *text, int attr = 1 ) {textview::add(text, attr);};
|
||||
virtual void add( char c, int attr = 1) {textview::add(c, attr);};
|
||||
virtual void clear() {textview::clear();};
|
||||
virtual void setFont(Fl_Font fnt) { textview::setFont(fnt); }
|
||||
virtual void setFontSize(int siz) { textview::setFontSize(siz); }
|
||||
virtual void setFontColor(Fl_Color clr) { textview::setFontColor(clr); }
|
||||
protected:
|
||||
int handle (int event);
|
||||
enum { RX_MENU_CALL, RX_MENU_NAME, RX_MENU_QTH, RX_MENU_LOC,
|
||||
RX_MENU_RST_IN, RX_MENU_DIV, RX_MENU_CLEAR, RX_MENU_COPY,
|
||||
RX_MENU_SAVE, RX_MENU_WRAP };
|
||||
void draw(void);
|
||||
void menu_cb(int val);
|
||||
void saveFile();
|
||||
};
|
||||
char *get_word(int x, int y);
|
||||
void saveFile(void);
|
||||
void clipboard_copy(void);
|
||||
void wrap_mode(bool v = true);
|
||||
|
||||
|
||||
class TextEdit : public textview {
|
||||
public:
|
||||
TextEdit( int x, int y, int w, int h, const char *label = 0 );
|
||||
virtual void add( char *text, int attr = 1 ) {textview::add(text);};
|
||||
virtual void add( const char *text, int attr = 1) {textview::add((char*)text);};
|
||||
virtual void add( char c, int attr = 1) {textview::add(c);};
|
||||
virtual void clear();
|
||||
int nextChar();
|
||||
void readFile();
|
||||
virtual void setFont(Fl_Font fnt) { textview::setFont(fnt); }
|
||||
virtual void setFontSize(int siz) { textview::setFontSize(siz); }
|
||||
virtual void setFontColor(Fl_Color clr) { textview::setFontColor(clr); }
|
||||
void cursorON();
|
||||
protected:
|
||||
int handle_fnckey(int key);
|
||||
int handle_key();
|
||||
int handle (int event);
|
||||
void menu_cb(int val);
|
||||
private:
|
||||
unsigned int chrptr;
|
||||
int bkspaces;
|
||||
bool PauseBreak;
|
||||
TextView();
|
||||
|
||||
protected:
|
||||
Fl_Text_Buffer *tbuf, *sbuf;
|
||||
static Fl_Text_Display::Style_Table_Entry styles[NSTYLES];
|
||||
int popx, popy;
|
||||
bool wrap;
|
||||
};
|
||||
|
||||
class TextEdit : public Fl_Text_Editor
|
||||
{
|
||||
public:
|
||||
TextEdit(int x, int y, int w, int h, const char *l = 0);
|
||||
~TextEdit();
|
||||
|
||||
int handle(int event);
|
||||
void add(const char *s, int attr = 1);
|
||||
void clear(void);
|
||||
int nextChar(void);
|
||||
|
||||
void setFont(int n, Fl_Font f);
|
||||
void setFontSize(int n, int s);
|
||||
void setFontColor(int n, Fl_Color c);
|
||||
void setFont(Fl_Font f) { setFont(-1, f); }
|
||||
void setFontSize(int s) { setFontSize(-1, s); }
|
||||
void setFontColor(Fl_Color c) { setFontColor(-1, c); }
|
||||
void cursorON(void);
|
||||
|
||||
public:
|
||||
enum { NSTYLES = 16 };
|
||||
|
||||
protected:
|
||||
enum { TX_MENU_TX, TX_MENU_RX, TX_MENU_MFSK16_IMG, TX_MENU_CLEAR,
|
||||
TX_MENU_CUT, TX_MENU_COPY, TX_MENU_PASTE, TX_MENU_READ,
|
||||
TX_MENU_WRAP };
|
||||
int handle_key(int key);
|
||||
void readFile(void);
|
||||
static void style_cb(int pos, int nins, int ndel, int nsty,
|
||||
const char *dtext, void *arg);
|
||||
void menu_cb(int val);
|
||||
void wrap_mode(bool v = true);
|
||||
|
||||
void change_keybindings(void);
|
||||
static int kf_default(int c, Fl_Text_Editor* e);
|
||||
static int kf_enter(int c, Fl_Text_Editor* e);
|
||||
static int kf_delete(int c, Fl_Text_Editor* e);
|
||||
static int kf_cut(int c, Fl_Text_Editor* e);
|
||||
static int kf_paste(int c, Fl_Text_Editor* e);
|
||||
|
||||
private:
|
||||
TextEdit();
|
||||
|
||||
protected:
|
||||
Fl_Text_Buffer *tbuf, *sbuf;
|
||||
static Fl_Text_Display::Style_Table_Entry styles[NSTYLES];
|
||||
bool PauseBreak;
|
||||
int txpos;
|
||||
static int *ptxpos;
|
||||
int bkspaces;
|
||||
int popx, popy;
|
||||
bool wrap;
|
||||
};
|
||||
|
||||
class autolock
|
||||
{
|
||||
public:
|
||||
autolock() : m(0) { Fl::lock(); }
|
||||
autolock(Fl_Mutex *m_) : m(m_) { fl_lock(m); }
|
||||
~autolock() { if (m) fl_unlock(m); else Fl::unlock(); }
|
||||
private:
|
||||
autolock(const autolock &a);
|
||||
Fl_Mutex *m;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#ifndef ASCII_H
|
||||
#define ASCII_H
|
||||
|
||||
extern char *ascii[];
|
||||
extern char *ascii2[];
|
||||
extern const char *ascii[];
|
||||
extern const char *ascii2[];
|
||||
|
||||
#endif
|
||||
|
|
|
@ -104,7 +104,7 @@ class Fl_ComboBox : public Fl_Group {
|
|||
|
||||
public:
|
||||
|
||||
Fl_ComboBox (int x, int y, int w, int h, char * = 0);
|
||||
Fl_ComboBox (int x, int y, int w, int h, const char * = 0);
|
||||
|
||||
const char *value ();
|
||||
void value (const char *);
|
||||
|
|
|
@ -151,7 +151,7 @@ protected:
|
|||
void update_syncscope();
|
||||
void update_Status();
|
||||
void sync_parameters();
|
||||
int handle_event(int cw_event, char **c);
|
||||
int handle_event(int cw_event, const char **c);
|
||||
int usec_diff(unsigned int earlier, unsigned int later);
|
||||
void send_symbol(int symbol);
|
||||
void send_ch(int c);
|
||||
|
|
|
@ -102,7 +102,7 @@ extern void set_video(double *, int);
|
|||
extern void set_CWwpm();
|
||||
extern void put_rx_char(unsigned int data);
|
||||
extern void put_sec_char( char chr );
|
||||
extern void put_status(char *msg);
|
||||
extern void put_status(const char *msg);
|
||||
extern void put_Status2(char *msg);
|
||||
extern void put_Status1(char *msg);
|
||||
extern void put_WARNstatus(bool);
|
||||
|
|
|
@ -59,7 +59,7 @@ private:
|
|||
fl_draw(label(), x()+3, y()+3, w()-6, h()-6, align());
|
||||
}
|
||||
public:
|
||||
Preview_Box(int x, int y, int w, int h, char* l) : Fl_Widget(x, y, w, h, l)
|
||||
Preview_Box(int x, int y, int w, int h, const char* l) : Fl_Widget(x, y, w, h, l)
|
||||
{
|
||||
fontName = 1;
|
||||
fontSize = 14;
|
||||
|
@ -98,7 +98,7 @@ private:
|
|||
void (*callback_)(Fl_Widget*, void *);
|
||||
|
||||
public:
|
||||
Font_Browser(char *lbl = "Font Browser");
|
||||
Font_Browser(const char *lbl = "Font Browser");
|
||||
void callback(void (*cb)(Fl_Widget *, void *), void *d = 0) {
|
||||
callback_ = cb;
|
||||
data_ = d;
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
#ifndef _GLOBALS_H
|
||||
#define _GLOBALS_H
|
||||
|
||||
extern char *mode_names[];
|
||||
extern char *state_names[];
|
||||
extern const char *mode_names[];
|
||||
extern const char *state_names[];
|
||||
|
||||
enum trx_mode {
|
||||
MODE_MFSK16 = 0,
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#ifndef _MFSKVARICODE_H
|
||||
#define _MFSKVARICODE_H
|
||||
|
||||
extern char *varienc(int c);
|
||||
extern const char *varienc(int c);
|
||||
extern int varidec(unsigned int symbol);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -93,7 +93,7 @@ public:
|
|||
const char * OutputVolumeName( int i );
|
||||
int GetNumInputSources();
|
||||
const char * GetInputSourceName( int i);
|
||||
int InputSourceNbr(char *source);
|
||||
int InputSourceNbr(const char *source);
|
||||
double InputVolume();
|
||||
void InputVolume( double volume );
|
||||
int GetCurrentInputSource();
|
||||
|
|
|
@ -90,7 +90,7 @@ public:
|
|||
|
||||
// void set_mode(trx_mode);
|
||||
trx_mode get_mode();
|
||||
char *get_mode_name() { return mode_names[get_mode()];}
|
||||
const char *get_mode_name() { return mode_names[get_mode()];}
|
||||
void set_state(state_t);
|
||||
void set_state_wait(state_t);
|
||||
state_t get_state();
|
||||
|
|
|
@ -46,9 +46,9 @@
|
|||
|
||||
|
||||
struct CW_TABLE{
|
||||
char *chr; /* The character(s) represented */
|
||||
char *rpr; /* Dot-dash shape of the character */
|
||||
int type; /* Type of the entry */
|
||||
const char *chr; /* The character(s) represented */
|
||||
const char *rpr; /* Dot-dash shape of the character */
|
||||
int type; /* Type of the entry */
|
||||
};
|
||||
|
||||
class morse {
|
||||
|
@ -56,7 +56,7 @@ private:
|
|||
// static CW_TABLE cw_table[];
|
||||
CW_TABLE *cw_rx_lookup[256];
|
||||
unsigned long cw_tx_lookup[256];
|
||||
unsigned int tokenize_representation(char *representation);
|
||||
unsigned int tokenize_representation(const char *representation);
|
||||
bool init();
|
||||
public:
|
||||
morse() {
|
||||
|
@ -64,7 +64,7 @@ public:
|
|||
}
|
||||
~morse() {
|
||||
}
|
||||
char *rx_lookup(char *r);
|
||||
const char *rx_lookup(char *r);
|
||||
unsigned long tx_lookup(int c);
|
||||
};
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#ifndef _VARICODE_H
|
||||
#define _VARICODE_H
|
||||
|
||||
extern char *psk_varicode_encode(unsigned char c);
|
||||
extern int psk_varicode_decode(unsigned int symbol);
|
||||
extern const char *psk_varicode_encode(unsigned char c);
|
||||
extern int psk_varicode_decode(unsigned int symbol);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -172,7 +172,7 @@ class QRZ
|
|||
unsigned int datarecsize;
|
||||
long numkeys;
|
||||
int keylen;
|
||||
void OpenQRZFiles( char * );
|
||||
void OpenQRZFiles( const char * );
|
||||
int FindCallsign( char * );
|
||||
int FindName( char * );
|
||||
int FindState( char * );
|
||||
|
@ -181,30 +181,30 @@ class QRZ
|
|||
int nextrec();
|
||||
bool hasImage;
|
||||
|
||||
char *Qcall;
|
||||
char *Qlname;
|
||||
char *Qfname;
|
||||
char *Qdob;
|
||||
char *Qefdate;
|
||||
char *Qexpdate;
|
||||
char *Qmail_str;
|
||||
char *Qmail_city;
|
||||
char *Qmail_st;
|
||||
char *Qmail_zip;
|
||||
char *Qopclass;
|
||||
char *Qp_call;
|
||||
char *Qimagefname;
|
||||
char *Qp_class;
|
||||
const char *Qcall;
|
||||
const char *Qlname;
|
||||
const char *Qfname;
|
||||
const char *Qdob;
|
||||
const char *Qefdate;
|
||||
const char *Qexpdate;
|
||||
const char *Qmail_str;
|
||||
const char *Qmail_city;
|
||||
const char *Qmail_st;
|
||||
const char *Qmail_zip;
|
||||
const char *Qopclass;
|
||||
const char *Qp_call;
|
||||
const char *Qimagefname;
|
||||
const char *Qp_class;
|
||||
|
||||
int QRZvalid;
|
||||
|
||||
public:
|
||||
QRZ( char * );
|
||||
QRZ( char *, char );
|
||||
QRZ( const char * );
|
||||
QRZ( const char *, char );
|
||||
~QRZ();
|
||||
|
||||
int CallComp( char *, char * );
|
||||
int CompState( char *, char *, char * );
|
||||
int CompState( const char *, const char *, const char * );
|
||||
|
||||
int getQRZvalid();
|
||||
|
||||
|
@ -213,23 +213,23 @@ class QRZ
|
|||
int ReadRec();
|
||||
int GetCount( char * );
|
||||
char *GetCall();
|
||||
char *GetLname();
|
||||
char *GetFname();
|
||||
char *GetDOB();
|
||||
char *GetEFdate();
|
||||
char *GetEXPdate();
|
||||
char *GetStreet();
|
||||
char *GetCity();
|
||||
char *GetState();
|
||||
char *GetZIP();
|
||||
char *GetOPclass();
|
||||
char *GetPriorCall();
|
||||
char *GetPriorClass();
|
||||
char *GetImageFileName();
|
||||
const char *GetLname();
|
||||
const char *GetFname();
|
||||
const char *GetDOB();
|
||||
const char *GetEFdate();
|
||||
const char *GetEXPdate();
|
||||
const char *GetStreet();
|
||||
const char *GetCity();
|
||||
const char *GetState();
|
||||
const char *GetZIP();
|
||||
const char *GetOPclass();
|
||||
const char *GetPriorCall();
|
||||
const char *GetPriorClass();
|
||||
const char *GetImageFileName();
|
||||
char *CSV_Record();
|
||||
char *Fmt_Record();
|
||||
bool ImageExists();
|
||||
char *ImageFileName() {return Qimagefname;};
|
||||
const char *ImageFileName() {return Qimagefname;};
|
||||
};
|
||||
|
||||
extern void SetQRZdirectory(char *dir);
|
||||
|
|
|
@ -34,7 +34,7 @@ class RigException {
|
|||
public:
|
||||
char message[80];
|
||||
RigException() { *message = 0;}
|
||||
RigException (char * msg) {
|
||||
RigException (const char * msg) {
|
||||
memset(message,0,80);
|
||||
strcpy(message, "Hamlib ");
|
||||
strcat(message, msg);
|
||||
|
|
|
@ -61,7 +61,7 @@ struct XMLIOS {
|
|||
};
|
||||
};
|
||||
|
||||
struct TAGS { char *tag; void (*fp)(size_t &);};
|
||||
struct TAGS { const char *tag; void (*fp)(size_t &);};
|
||||
|
||||
struct XMLRIG {
|
||||
string SYMBOL;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#ifndef _VERSION_H
|
||||
#define _VERSION_H
|
||||
|
||||
#define FLDIGI_VERSION "1.35N"
|
||||
#define FLDIGI_VERSION "1.35o"
|
||||
|
||||
#endif
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include <FL/fl_ask.H>
|
||||
|
||||
struct FIELD {
|
||||
char *name;
|
||||
const char *name;
|
||||
unsigned int size;
|
||||
};
|
||||
|
||||
|
@ -78,7 +78,7 @@ FIELD fields[] = {
|
|||
#define ADIF_VERS "2.0"
|
||||
static string adif;
|
||||
|
||||
char *ADIFHEADER =
|
||||
const char *ADIFHEADER =
|
||||
"<ADIF_VERS:%d>%s\n\
|
||||
<PROGRAMID:7>fldigi\n\
|
||||
<PROGRAMVERSION:%d>%s\n\
|
||||
|
|
|
@ -627,7 +627,7 @@ void mfsk::sendbit(int bit)
|
|||
|
||||
void mfsk::sendchar(unsigned char c)
|
||||
{
|
||||
char *code = varienc(c);
|
||||
const char *code = varienc(c);
|
||||
while (*code)
|
||||
sendbit(*code++ - '0');
|
||||
put_echo_char(c);
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
* The IZ8BLY MFSK Varicode as defined in
|
||||
* http://www.qsl.net/zl1bpu/MFSK/Varicode.html
|
||||
*/
|
||||
static char *varicode[] = {
|
||||
static const char *varicode[] = {
|
||||
"11101011100", /* 000 - <NUL> */
|
||||
"11101100000", /* 001 - <SOH> */
|
||||
"11101101000", /* 002 - <STX> */
|
||||
|
@ -291,7 +291,7 @@ static char *varicode[] = {
|
|||
/*
|
||||
* The same in a format more suitable for decoding.
|
||||
*/
|
||||
static unsigned int varidecode[] = {
|
||||
static const unsigned int varidecode[] = {
|
||||
0x75C, 0x760, 0x768, 0x76C, 0x770, 0x774, 0x778, 0x77C,
|
||||
0x0A8, 0x780, 0x7A0, 0x7A8, 0x7AC, 0x0AC, 0x7B0, 0x7B4,
|
||||
0x7B8, 0x7BC, 0x7C0, 0x7D0, 0x7D4, 0x7D8, 0x7DC, 0x7E0,
|
||||
|
@ -326,7 +326,7 @@ static unsigned int varidecode[] = {
|
|||
0x6F4, 0x6F8, 0x6FC, 0x700, 0x740, 0x750, 0x754, 0x758
|
||||
};
|
||||
|
||||
char *varienc(int c)
|
||||
const char *varienc(int c)
|
||||
{
|
||||
if (c >= 0 && c < 256)
|
||||
return varicode[c];
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include "ascii.h"
|
||||
|
||||
char *ascii[256] = {
|
||||
const char *ascii[256] = {
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
"\b", "\t", "\n", "",
|
||||
|
@ -61,7 +61,7 @@ char *ascii[256] = {
|
|||
"|", "}", "~", ""
|
||||
};
|
||||
|
||||
char *ascii2[256] = {
|
||||
const char *ascii2[256] = {
|
||||
"<NUL>", "<SOH>", "<STX>", "<ETX>",
|
||||
"<EOT>", "<ENQ>", "<ACK>", "<BEL>",
|
||||
"\b", "\t", "\n", "<VT>",
|
||||
|
|
|
@ -139,7 +139,7 @@ configuration progdefaults = {
|
|||
{223,226,105},{254,254, 4},{255, 58, 0} }
|
||||
};
|
||||
|
||||
char *szBaudRates[] = {
|
||||
const char *szBaudRates[] = {
|
||||
"",
|
||||
"300","600","1200","2400",
|
||||
"4800","9600","19200","38400",
|
||||
|
@ -809,7 +809,6 @@ int configuration::openDefaults() {
|
|||
|
||||
ReceiveText->setFont((Fl_Font)Font);
|
||||
ReceiveText->setFontSize(FontSize);
|
||||
ReceiveText->setFontColor((Fl_Color)FontColor);
|
||||
|
||||
TransmitText->setFont((Fl_Font)Font);
|
||||
TransmitText->setFontSize(FontSize);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include "log.h"
|
||||
|
||||
static char *lognames[] = {"RX", "TX"};
|
||||
static const char *lognames[] = {"RX", "TX"};
|
||||
|
||||
cLogfile::cLogfile(string fname) {
|
||||
logtype = LOG_RX;
|
||||
|
|
|
@ -22,7 +22,7 @@ CONTESTCNTR contest_count;
|
|||
static bool TransmitON = false;
|
||||
int mNbr;
|
||||
|
||||
struct MTAGS { char *mTAG; void (*fp)(string &, size_t &);};
|
||||
struct MTAGS { const char *mTAG; void (*fp)(string &, size_t &);};
|
||||
|
||||
void pCALL(string &, size_t &);
|
||||
void pFREQ(string &, size_t &);
|
||||
|
|
|
@ -114,16 +114,16 @@ CQ CQ CQ de <MYCALL> <MYCALL> <MYCALL> pse k\n\
|
|||
}
|
||||
|
||||
struct paldata {
|
||||
char *fname;
|
||||
char *rgbstr0;
|
||||
char *rgbstr1;
|
||||
char *rgbstr2;
|
||||
char *rgbstr3;
|
||||
char *rgbstr4;
|
||||
char *rgbstr5;
|
||||
char *rgbstr6;
|
||||
char *rgbstr7;
|
||||
char *rgbstr8;
|
||||
const char *fname;
|
||||
const char *rgbstr0;
|
||||
const char *rgbstr1;
|
||||
const char *rgbstr2;
|
||||
const char *rgbstr3;
|
||||
const char *rgbstr4;
|
||||
const char *rgbstr5;
|
||||
const char *rgbstr6;
|
||||
const char *rgbstr7;
|
||||
const char *rgbstr8;
|
||||
};
|
||||
|
||||
paldata palfiles[] = {
|
||||
|
|
|
@ -74,7 +74,7 @@ static string qrzqth;
|
|||
static string qrzgrid;
|
||||
static string qrznotes;
|
||||
|
||||
static char *error[] = {
|
||||
static const char *error[] = {
|
||||
"OK", // err 0
|
||||
"Host not found", // err 1
|
||||
"Not an IP host!", // err 2
|
||||
|
|
|
@ -34,8 +34,8 @@
|
|||
|
||||
static char QRZdir[256] = "";
|
||||
|
||||
static char *QRZpath;
|
||||
static char *QRZtry[] = {
|
||||
static const char *QRZpath;
|
||||
static const char *QRZtry[] = {
|
||||
"~/callbk/",
|
||||
"/cdrom/callbk/",
|
||||
"/mnt/cdrom/callbk/", "/mnt/cdrom0/callbk/", "/mnt/cdrom1/callbk/",
|
||||
|
@ -129,11 +129,11 @@ char *QRZImageFilename (char *call)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
int checkPath( char *filename )
|
||||
int checkPath( const char *filename )
|
||||
{
|
||||
char fname[80];
|
||||
FILE *f;
|
||||
char **pQRZpath = QRZtry;
|
||||
const char **pQRZpath = QRZtry;
|
||||
while (*pQRZpath) {
|
||||
strcpy( fname, *pQRZpath );
|
||||
strcat( fname, filename );
|
||||
|
@ -176,7 +176,7 @@ bool QRZ::ImageExists() {
|
|||
return (hasImage = false);
|
||||
}
|
||||
|
||||
void QRZ::OpenQRZFiles( char *fname )
|
||||
void QRZ::OpenQRZFiles( const char *fname )
|
||||
{
|
||||
long fsize;
|
||||
char dfname[64];
|
||||
|
@ -264,14 +264,14 @@ void QRZ::OpenQRZFiles( char *fname )
|
|||
}
|
||||
|
||||
|
||||
QRZ::QRZ( char *fname )
|
||||
QRZ::QRZ( const char *fname )
|
||||
{
|
||||
int len = strlen(fname);
|
||||
criteria = fname[ len - 1 ];
|
||||
OpenQRZFiles( fname );
|
||||
}
|
||||
|
||||
QRZ::QRZ( char *fname, char c )
|
||||
QRZ::QRZ( const char *fname, char c )
|
||||
{
|
||||
criteria = c;
|
||||
OpenQRZFiles( fname );
|
||||
|
@ -531,7 +531,7 @@ int QRZ::FindName( char *field )
|
|||
return 0;
|
||||
}
|
||||
|
||||
int QRZ::CompState( char *field, char *state, char *city )
|
||||
int QRZ::CompState( const char *field, const char *state, const char *city )
|
||||
{
|
||||
int compsize = strlen(field+2),
|
||||
chk;
|
||||
|
@ -697,7 +697,7 @@ int QRZ::FindRecord( char *field )
|
|||
return( ReadRec() );
|
||||
}
|
||||
|
||||
static char *empty = "";
|
||||
static const char *empty = "";
|
||||
|
||||
|
||||
int QRZ::ReadRec()
|
||||
|
@ -746,7 +746,8 @@ int QRZ::ReadRec()
|
|||
comma = strchr( Qp_call, ',' );
|
||||
*comma = 0;
|
||||
Qp_class = comma + 1;
|
||||
Qp_class[1] = 0;
|
||||
//Qp_class[1] = 0;
|
||||
*(comma + 2) = 0;
|
||||
Qimagefname = QRZImageFilename (GetCall());
|
||||
return( 1 );
|
||||
} else {
|
||||
|
@ -818,62 +819,62 @@ char * QRZ::GetCall()
|
|||
return( call );
|
||||
};
|
||||
|
||||
char * QRZ::GetLname()
|
||||
const char * QRZ::GetLname()
|
||||
{
|
||||
return( Qlname );
|
||||
};
|
||||
|
||||
char * QRZ::GetFname()
|
||||
const char * QRZ::GetFname()
|
||||
{
|
||||
return( Qfname );
|
||||
};
|
||||
|
||||
char * QRZ::GetDOB()
|
||||
const char * QRZ::GetDOB()
|
||||
{
|
||||
return( Qdob );
|
||||
};
|
||||
|
||||
char * QRZ::GetEFdate()
|
||||
const char * QRZ::GetEFdate()
|
||||
{
|
||||
return( Qefdate );
|
||||
};
|
||||
|
||||
char * QRZ::GetEXPdate()
|
||||
const char * QRZ::GetEXPdate()
|
||||
{
|
||||
return( Qexpdate );
|
||||
};
|
||||
|
||||
char * QRZ::GetStreet()
|
||||
const char * QRZ::GetStreet()
|
||||
{
|
||||
return( Qmail_str );
|
||||
};
|
||||
|
||||
char * QRZ::GetCity()
|
||||
const char * QRZ::GetCity()
|
||||
{
|
||||
return( Qmail_city );
|
||||
};
|
||||
|
||||
char * QRZ::GetState()
|
||||
const char * QRZ::GetState()
|
||||
{
|
||||
return( Qmail_st );
|
||||
};
|
||||
|
||||
char * QRZ::GetZIP()
|
||||
const char * QRZ::GetZIP()
|
||||
{
|
||||
return( Qmail_zip );
|
||||
};
|
||||
|
||||
char * QRZ::GetOPclass()
|
||||
const char * QRZ::GetOPclass()
|
||||
{
|
||||
return( Qopclass );
|
||||
};
|
||||
|
||||
char * QRZ::GetPriorCall()
|
||||
const char * QRZ::GetPriorCall()
|
||||
{
|
||||
return( Qp_call );
|
||||
};
|
||||
|
||||
char * QRZ::GetPriorClass()
|
||||
const char * QRZ::GetPriorClass()
|
||||
{
|
||||
return( Qp_class );
|
||||
};
|
||||
|
@ -883,7 +884,7 @@ int QRZ::getQRZvalid()
|
|||
return( QRZvalid );
|
||||
}
|
||||
|
||||
char * QRZ::GetImageFileName ()
|
||||
const char * QRZ::GetImageFileName ()
|
||||
{
|
||||
return (Qimagefname);
|
||||
}
|
||||
|
@ -892,9 +893,9 @@ char * QRZ::CSV_Record()
|
|||
{
|
||||
static char info[256];
|
||||
memset( info, 0, 256 );
|
||||
sprintf( info, "%s,%s,%s,%s,%s,%s,%s,%s,%s",
|
||||
GetCall(), Qopclass, Qefdate,
|
||||
Qlname, Qfname, Qmail_str, Qmail_city, Qmail_st, Qmail_zip );
|
||||
snprintf( info, 256, "%s,%s,%s,%s,%s,%s,%s,%s,%s",
|
||||
GetCall(), Qopclass, Qefdate,
|
||||
Qlname, Qfname, Qmail_str, Qmail_city, Qmail_st, Qmail_zip );
|
||||
return info;
|
||||
}
|
||||
|
||||
|
|
|
@ -532,7 +532,7 @@ void psk::tx_bit(int bit)
|
|||
|
||||
void psk::tx_char(unsigned char c)
|
||||
{
|
||||
char *code;
|
||||
const char *code;
|
||||
|
||||
code = psk_varicode_encode(c);
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
// PSK31 Varicode for encoding
|
||||
|
||||
static char *varicodetab1[] = {
|
||||
static const char *varicodetab1[] = {
|
||||
"1010101011", /* 0 - <NUL> */
|
||||
"1011011011", /* 1 - <SOH> */
|
||||
"1011101101", /* 2 - <STX> */
|
||||
|
@ -323,7 +323,7 @@ static unsigned int varicodetab2[] = {
|
|||
0xAF5, 0xAF7, 0xAFB, 0xAFD, 0xAFF, 0xB55, 0xB57, 0xB5B
|
||||
};
|
||||
|
||||
char *psk_varicode_encode(unsigned char c)
|
||||
const char *psk_varicode_encode(unsigned char c)
|
||||
{
|
||||
return varicodetab1[c];
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include "FreqControl.h"
|
||||
|
||||
char *cFreqControl::Label[10] = {
|
||||
const char *cFreqControl::Label[10] = {
|
||||
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
||||
|
||||
void cFreqControl::IncFreq (int nbr) {
|
||||
|
@ -58,7 +58,7 @@ void cbSelectDigit (Fl_Widget *btn, void * nbr)
|
|||
fc->damage();
|
||||
}
|
||||
|
||||
cFreqControl::cFreqControl(int x, int y, int w, int h, char *lbl):
|
||||
cFreqControl::cFreqControl(int x, int y, int w, int h, const char *lbl):
|
||||
Fl_Group(x,y,w,h,"") {
|
||||
ONCOLOR = FL_YELLOW;
|
||||
OFFCOLOR = FL_BLACK;
|
||||
|
|
|
@ -39,7 +39,7 @@ static int dummy = 0;
|
|||
|
||||
static void *hamlib_loop(void *args);
|
||||
|
||||
void show_error(char * a, char * b)
|
||||
void show_error(const char * a, const char * b)
|
||||
{
|
||||
string msg = a;
|
||||
msg.append(": ");
|
||||
|
|
|
@ -749,7 +749,7 @@ void rigCAT_sendINIT()
|
|||
fl_unlock(&rigCAT_mutex);
|
||||
}
|
||||
|
||||
static void show_error(char * a, char * b)
|
||||
static void show_error(const char * a, const char * b)
|
||||
{
|
||||
string msg = a;
|
||||
msg.append(": ");
|
||||
|
|
|
@ -27,7 +27,7 @@ long int freqlist[LISTSIZE];
|
|||
int numinlist = 0;
|
||||
|
||||
#ifndef NOHAMLIB
|
||||
char *szmodes[] = {
|
||||
const char *szmodes[] = {
|
||||
"AM",
|
||||
"USB",
|
||||
"LSB",
|
||||
|
@ -277,7 +277,7 @@ bool init_Hamlib_RigDialog()
|
|||
{
|
||||
opBW->hide();
|
||||
opMODE->clear();
|
||||
char **p;
|
||||
const char **p;
|
||||
p = szmodes;
|
||||
while (*p)
|
||||
opMODE->add(*p++);
|
||||
|
|
|
@ -253,7 +253,7 @@ const char *cMixer::GetInputSourceName( int i)
|
|||
return labels[recs[i]];
|
||||
}
|
||||
|
||||
int cMixer::InputSourceNbr(char *source)
|
||||
int cMixer::InputSourceNbr(const char *source)
|
||||
{
|
||||
const char *labels[] = SOUND_DEVICE_LABELS;
|
||||
char lbl[80];
|
||||
|
|
Ładowanie…
Reference in New Issue