kopia lustrzana https://github.com/jamescoxon/dl-fldigi
Upstream version 1.37h
rodzic
e1efe8c816
commit
23860fbd02
|
|
@ -25,6 +25,7 @@ Change Log:
|
|||
ability to save and playback wav files (when fldigi is run as:
|
||||
fldigi TEST).
|
||||
16) Added Azimuth computation to QRZ query (submitted by WA5ZNU).
|
||||
17) Corrected adif file header field <PROGRAMID:6>fldigi
|
||||
1.34 1) Cleaned up unused code segments
|
||||
2) Modified CW decoder to allow setting upper and lower limits on
|
||||
Tx WPM
|
||||
|
|
|
|||
|
|
@ -0,0 +1,291 @@
|
|||
# This is the default makefile used to produce a static lib executable in the
|
||||
# same directory as the makefile. This executable does not contain debug references
|
||||
# The executable does not rely on libjpeg libpng or libzlib
|
||||
# fltk should have been configured as:
|
||||
# ./configure --enable-threads --enable-xft --enable-localjpeg --enable-localpng --enable-localzlib
|
||||
#
|
||||
# Our default target is hamlib. Commands are echoed if V=1.
|
||||
|
||||
# This is the default shell for GNU make. We have tested with bash, zsh and dash.
|
||||
SHELL = /bin/sh
|
||||
|
||||
# argument handling
|
||||
|
||||
CTARG = hamlib
|
||||
ifneq (,$(findstring hamlib-debug, $(CFG)))
|
||||
override CTARG = hamlib-debug
|
||||
endif
|
||||
ifneq (,$(findstring hamlib-static, $(CFG)))
|
||||
override CTARG = hamlib-static
|
||||
endif
|
||||
ifneq (,$(findstring nhl, $(CFG)))
|
||||
override CTARG = nhl
|
||||
endif
|
||||
ifneq (,$(findstring nhl-debug, $(CFG)))
|
||||
override CTARG = nhl-debug
|
||||
endif
|
||||
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
|
||||
|
||||
|
||||
# compiler and preprocessor options
|
||||
CXX = g++
|
||||
|
||||
INCLUDE_DIRS = src src/include
|
||||
CPPFLAGS = $(addprefix -I,$(INCLUDE_DIRS))
|
||||
|
||||
CXXFLAGS = -pipe $(shell fltk-config --cxxflags) -Wall -Wno-deprecated -O2 -ffast-math -fno-rtti -fexceptions
|
||||
|
||||
# libraries and flags
|
||||
HAMLIBS = -lhamlib
|
||||
IMGLIBS = -lfltk_jpeg -lfltk_png -lfltk_z
|
||||
#LIB_DIRS = -L/usr/local/lib
|
||||
|
||||
DYN_LDFLAGS = $(shell fltk-config --ldflags --use-images)
|
||||
STATIC_LDFLAGS = $(shell fltk-config --ldstaticflags --use-images)
|
||||
|
||||
# our source files
|
||||
SRC_DIR = src
|
||||
SRC = \
|
||||
$(SRC_DIR)/fft/fft.cxx \
|
||||
$(SRC_DIR)/waterfall/waterfall.cxx \
|
||||
$(SRC_DIR)/soundcard/sound.cxx \
|
||||
$(SRC_DIR)/dialogs/fl_digi.cxx \
|
||||
$(SRC_DIR)/misc/threads.cxx \
|
||||
$(SRC_DIR)/filters/viterbi.cxx \
|
||||
$(SRC_DIR)/trx/trx.cxx \
|
||||
$(SRC_DIR)/psk/psk.cxx \
|
||||
$(SRC_DIR)/psk/pskvaricode.cxx \
|
||||
$(SRC_DIR)/psk/pskcoeff.cxx \
|
||||
$(SRC_DIR)/mfsk/mfsk.cxx \
|
||||
$(SRC_DIR)/mfsk/interleave.cxx \
|
||||
$(SRC_DIR)/mfsk/mfskvaricode.cxx \
|
||||
$(SRC_DIR)/misc/ascii.cxx \
|
||||
$(SRC_DIR)/globals/globals.cxx \
|
||||
$(SRC_DIR)/trx/modem.cxx \
|
||||
$(SRC_DIR)/misc/misc.cxx \
|
||||
$(SRC_DIR)/filters/fftfilt.cxx \
|
||||
$(SRC_DIR)/dialogs/Config.cxx \
|
||||
$(SRC_DIR)/misc/configuration.cxx \
|
||||
$(SRC_DIR)/filters/filters.cxx \
|
||||
$(SRC_DIR)/dialogs/TextView.cxx \
|
||||
$(SRC_DIR)/dialogs/font_browser.cxx \
|
||||
$(SRC_DIR)/misc/macros.cxx \
|
||||
$(SRC_DIR)/main.cxx \
|
||||
$(SRC_DIR)/rigcontrol/ptt.cxx \
|
||||
$(SRC_DIR)/waterfall/digiscope.cxx \
|
||||
$(SRC_DIR)/logger/logger.cxx \
|
||||
$(SRC_DIR)/olivia/olivia.cxx \
|
||||
$(SRC_DIR)/dominoex/dominoex.cxx \
|
||||
$(SRC_DIR)/dominoex/dominovar.cxx \
|
||||
$(SRC_DIR)/wwv/wwv.cxx \
|
||||
$(SRC_DIR)/misc/log.cxx \
|
||||
$(SRC_DIR)/misc/pskmail.cxx \
|
||||
$(SRC_DIR)/cw_rtty/cw.cxx \
|
||||
$(SRC_DIR)/cw_rtty/rtty.cxx \
|
||||
$(SRC_DIR)/cw_rtty/morse.cxx \
|
||||
$(SRC_DIR)/feld/feld.cxx \
|
||||
$(SRC_DIR)/waterfall/raster.cxx \
|
||||
$(SRC_DIR)/feld/feldfonts.cxx \
|
||||
$(SRC_DIR)/wwv/analysis.cxx \
|
||||
$(SRC_DIR)/throb/throb.cxx \
|
||||
$(SRC_DIR)/ider/id.cxx \
|
||||
$(SRC_DIR)/widgets/picture.cxx \
|
||||
$(SRC_DIR)/samplerate/samplerate.c \
|
||||
$(SRC_DIR)/samplerate/src_linear.c \
|
||||
$(SRC_DIR)/samplerate/src_sinc.c \
|
||||
$(SRC_DIR)/samplerate/src_zoh.c \
|
||||
$(SRC_DIR)/combo/combo.cxx \
|
||||
$(SRC_DIR)/fileselector/File_Selector.cxx \
|
||||
$(SRC_DIR)/fileselector/File_Selector2.cxx \
|
||||
$(SRC_DIR)/fileselector/file_dir.cxx \
|
||||
$(SRC_DIR)/misc/status.cxx \
|
||||
$(SRC_DIR)/misc/qrzcall.cxx \
|
||||
$(SRC_DIR)/misc/qrzlib.cxx \
|
||||
$(SRC_DIR)/rigcontrol/FreqControl.cxx \
|
||||
$(SRC_DIR)/rigcontrol/rigdialog.cxx \
|
||||
$(SRC_DIR)/rigcontrol/rigsupport.cxx \
|
||||
$(SRC_DIR)/rigcontrol/rigMEM.cxx \
|
||||
$(SRC_DIR)/rigcontrol/rigio.cxx \
|
||||
$(SRC_DIR)/rigcontrol/rigxml.cxx \
|
||||
$(SRC_DIR)/rigcontrol/serial.cxx \
|
||||
$(SRC_DIR)/misc/newinstall.cxx \
|
||||
$(SRC_DIR)/waterfall/colorbox.cxx \
|
||||
$(SRC_DIR)/soundcard/mixer.cxx \
|
||||
$(SRC_DIR)/misc/macroedit.cxx
|
||||
|
||||
# We do not always compile these. CFG targets that link with hamlib
|
||||
# will append HAMLIB_SRC to SRC.
|
||||
HAMLIB_SRC = \
|
||||
$(SRC_DIR)/rigcontrol/hamlib.cxx \
|
||||
$(SRC_DIR)/rigcontrol/rigclass.cxx
|
||||
|
||||
# binaries
|
||||
DEP_DIR = Depends
|
||||
OBJ_DIR = Objects
|
||||
BIN_DIR = Install
|
||||
BINARY = $(BIN_DIR)/fldigi
|
||||
|
||||
#################### begin cfg
|
||||
ifeq ($(CTARG),hamlib)
|
||||
CPPFLAGS += -DPORTAUDIO
|
||||
CXXFLAGS += -s
|
||||
LDFLAGS = $(DYN_LDFLAGS) -lportaudiocpp -lportaudio -lsndfile $(HAMLIBS)
|
||||
SRC += $(HAMLIB_SRC)
|
||||
endif
|
||||
|
||||
ifeq ($(CTARG),hamlib-static)
|
||||
CPPFLAGS += -DPORTAUDIO
|
||||
CXXFLAGS += -s
|
||||
LDFLAGS = $(STATIC_LDFLAGS) /usr/local/lib/libportaudiocpp.a \
|
||||
/usr/local/lib/libportaudio.a /usr/local/lib/libsndfile.a \
|
||||
$(HAMLIBS) $(IMGLIBS)
|
||||
SRC += $(HAMLIB_SRC)
|
||||
endif
|
||||
|
||||
ifeq ($(CTARG),emcomm)
|
||||
CPPFLAGS += -DPORTAUDIO -DEMCOMM
|
||||
CXXFLAGS += -s
|
||||
LDFLAGS = $(STATIC_LDFLAGS) /usr/local/lib/libportaudiocpp.a \
|
||||
/usr/local/lib/libportaudio.a /usr/local/lib/libsndfile.a \
|
||||
$(HAMLIBS) $(IMGLIBS)
|
||||
SRC += $(HAMLIB_SRC)
|
||||
endif
|
||||
|
||||
ifeq ($(CTARG),hamlib-debug)
|
||||
CPPFLAGS += -DPORTAUDIO
|
||||
CXXFLAGS += -O0 -ggdb3
|
||||
LDFLAGS = $(DYN_LDFLAGS) -lportaudiocpp -lportaudio -lsndfile $(HAMLIBS)
|
||||
SRC += $(HAMLIB_SRC)
|
||||
endif
|
||||
|
||||
ifeq ($(CTARG),nhl)
|
||||
CPPFLAGS += -DNOHAMLIB -DPORTAUDIO
|
||||
CXXFLAGS += -s
|
||||
LDFLAGS = $(DYN_LDFLAGS) -lportaudiocpp -lportaudio -lsndfile
|
||||
endif
|
||||
|
||||
ifeq ($(CTARG),nhl-static)
|
||||
CPPFLAGS += -DNOHAMLIB -DPORTAUDIO
|
||||
CXXFLAGS += -s
|
||||
LDFLAGS = $(STATIC_LDFLAGS) /usr/local/lib/libportaudiocpp.a \
|
||||
/usr/local/lib/libportaudio.a /usr/local/lib/libsndfile.a \
|
||||
$(IMGLIBS)
|
||||
endif
|
||||
|
||||
ifeq ($(CTARG),nhl-debug)
|
||||
CPPFLAGS += -DNOHAMLIB -DPORTAUDIO
|
||||
CXXFLAGS += -O0 -ggdb3
|
||||
LDFLAGS = $(DYN_LDFLAGS) -lportaudiocpp -lportaudio -lsndfile
|
||||
endif
|
||||
|
||||
ifeq ($(CTARG),nhl-emcomm)
|
||||
CPPFLAGS += -DNOHAMLIB -DPORTAUDIO -DEMCOMM
|
||||
CXXFLAGS += -s
|
||||
LDFLAGS = $(STATIC_LDFLAGS) /usr/local/lib/libportaudiocpp.a \
|
||||
/usr/local/lib/libportaudio.a /usr/local/lib/libsndfile.a \
|
||||
$(IMGLIBS)
|
||||
endif
|
||||
#################### end cfg
|
||||
|
||||
|
||||
# our object files
|
||||
OBJS = $(addprefix $(OBJ_DIR)/,$(addsuffix .o,$(basename $(notdir $(SRC)))))
|
||||
|
||||
|
||||
# some "canned commands" variables
|
||||
define preproc_cmd
|
||||
set -e; mkdir -p $(dir $@); \
|
||||
$(CXX) $(CPPFLAGS) -MM "$(subst $(DEP_DIR)/,$(SRC_DIR)/,$(subst .deps,,$@))" \
|
||||
-MT "$(addprefix $(OBJ_DIR)/,$(addsuffix .o,$(notdir $(basename $(basename $@)))))" \
|
||||
-MT "$@" -MF "$@"
|
||||
endef
|
||||
|
||||
define compile_cmd
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
|
||||
endef
|
||||
|
||||
define link_cmd
|
||||
$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
|
||||
endef
|
||||
|
||||
|
||||
ifneq ($(V), 1) # be quiet
|
||||
|
||||
define preproc_source
|
||||
@echo Generating $@
|
||||
@$(preproc_cmd) || { r=$$?; /bin/echo -e "Failed command was:\n$(preproc_cmd)" >&2; exit $$r; }
|
||||
endef
|
||||
|
||||
define compile_source
|
||||
@echo Compiling $<
|
||||
@$(compile_cmd) || { r=$$?; /bin/echo -e "Failed command was:\n$(compile_cmd)" >&2; exit $$r; }
|
||||
endef
|
||||
|
||||
define link_objects
|
||||
@echo Linking $@
|
||||
@$(link_cmd) || { r=$$?; /bin/echo -e "Failed command was:\n$(link_cmd)" >&2; exit $$r; }
|
||||
endef
|
||||
|
||||
else # be verbose
|
||||
|
||||
define preproc_source
|
||||
$(preproc_cmd)
|
||||
endef
|
||||
|
||||
define compile_source
|
||||
$(compile_cmd)
|
||||
endef
|
||||
|
||||
define link_objects
|
||||
$(link_cmd)
|
||||
endef
|
||||
|
||||
endif # ($(V), 1)
|
||||
|
||||
|
||||
# targets
|
||||
|
||||
.PHONY: all print_header directories clean
|
||||
|
||||
all: print_header directories $(BINARY)
|
||||
|
||||
$(BINARY): $(OBJS)
|
||||
$(link_objects)
|
||||
|
||||
%.deps:
|
||||
$(preproc_source)
|
||||
|
||||
# We will generate the .deps in $(DEPS) below using the %.deps rule
|
||||
# unless our target is ``clean''.
|
||||
# unless our (non-compiling!) target is included in the egrep args
|
||||
DEPS = $(subst src/,$(DEP_DIR)/,$(patsubst %,%.deps,$(SRC)))
|
||||
|
||||
#To ignore multiple targets use this instead:
|
||||
#ifeq ($(shell echo $(MAKECMDGOALS) | egrep 'clean|anothertarget|onemore'),)
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
include $(DEPS)
|
||||
endif
|
||||
|
||||
# this target must appear after the deps have been included
|
||||
%.o:
|
||||
$(compile_source)
|
||||
|
||||
print_header:
|
||||
@echo --- Building fldigi
|
||||
@echo --- executable in directory $(BIN_DIR)
|
||||
@echo --- object files in $(OBJ_DIR)
|
||||
|
||||
directories:
|
||||
@mkdir -p $(BIN_DIR) $(OBJ_DIR)
|
||||
|
||||
clean:
|
||||
@echo Deleting intermediate files for fldigi
|
||||
@rm -rf $(DEP_DIR) $(OBJ_DIR) $(BINARY)
|
||||
438
makefile
438
makefile
|
|
@ -1,438 +0,0 @@
|
|||
# This is the default makefile used to produce a static lib executable in the
|
||||
# same directory as the makefile. This executable does not contain debug references
|
||||
# The executable does not rely on libjpeg libpng or libzlib
|
||||
# fltk should have been configured as:
|
||||
# ./configure --enable-threads --enable-xft --enable-localjpeg --enable-localpng --enable-localzlib
|
||||
#
|
||||
|
||||
CTARG = hamlib
|
||||
ifneq (,$(findstring hamlib-debug, $(CFG)))
|
||||
override CTARG = hamlib-debug
|
||||
endif
|
||||
ifneq (,$(findstring hamlib-static, $(CFG)))
|
||||
override CTARG = hamlib-static
|
||||
endif
|
||||
ifneq (,$(findstring nhl, $(CFG)))
|
||||
override CTARG = nhl
|
||||
endif
|
||||
ifneq (,$(findstring nhl-debug, $(CFG)))
|
||||
override CTARG = nhl-debug
|
||||
endif
|
||||
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
|
||||
CC = g++
|
||||
#"/usr/bin/g++"
|
||||
|
||||
OBJ_DIR = ./Objects
|
||||
OUTPUT_DIR = ./Install
|
||||
TARGET = fldigi
|
||||
LIB_DIRS = -L"/usr/local/lib"
|
||||
C_INCLUDE_DIRS = -I"src" -I"src/include"
|
||||
CCFLAGS = `fltk-config --cxxflags` -Wno-deprecated -ffast-math -Wall -O2 -fno-rtti -fexceptions
|
||||
|
||||
HAMLIBS = -lhamlib
|
||||
IMGLIBS = -lfltk_jpeg -lfltk_png -lfltk_z
|
||||
STATIC_LDFLAGS = -pipe `fltk-config --ldstaticflags --use-images`
|
||||
DYN_LDFLAGS = -pipe `fltk-config --ldflags --use-images`
|
||||
|
||||
|
||||
SRC_OBJS = \
|
||||
$(OBJ_DIR)/fft.o \
|
||||
$(OBJ_DIR)/waterfall.o \
|
||||
$(OBJ_DIR)/sound.o \
|
||||
$(OBJ_DIR)/fl_digi.o \
|
||||
$(OBJ_DIR)/threads.o \
|
||||
$(OBJ_DIR)/viterbi.o \
|
||||
$(OBJ_DIR)/trx.o \
|
||||
$(OBJ_DIR)/psk.o \
|
||||
$(OBJ_DIR)/pskvaricode.o \
|
||||
$(OBJ_DIR)/pskcoeff.o \
|
||||
$(OBJ_DIR)/mfsk.o \
|
||||
$(OBJ_DIR)/interleave.o \
|
||||
$(OBJ_DIR)/mfskvaricode.o \
|
||||
$(OBJ_DIR)/ascii.o \
|
||||
$(OBJ_DIR)/globals.o \
|
||||
$(OBJ_DIR)/modem.o \
|
||||
$(OBJ_DIR)/misc.o \
|
||||
$(OBJ_DIR)/fftfilt.o \
|
||||
$(OBJ_DIR)/Config.o \
|
||||
$(OBJ_DIR)/configuration.o \
|
||||
$(OBJ_DIR)/filters.o \
|
||||
$(OBJ_DIR)/TextView.o \
|
||||
$(OBJ_DIR)/font_browser.o \
|
||||
$(OBJ_DIR)/macros.o \
|
||||
$(OBJ_DIR)/macroedit.o \
|
||||
$(OBJ_DIR)/main.o \
|
||||
$(OBJ_DIR)/ptt.o \
|
||||
$(OBJ_DIR)/digiscope.o \
|
||||
$(OBJ_DIR)/logger.o \
|
||||
$(OBJ_DIR)/olivia.o \
|
||||
$(OBJ_DIR)/dominoex.o \
|
||||
$(OBJ_DIR)/dominovar.o \
|
||||
$(OBJ_DIR)/wwv.o \
|
||||
$(OBJ_DIR)/log.o \
|
||||
$(OBJ_DIR)/pskmail.o \
|
||||
$(OBJ_DIR)/cw.o \
|
||||
$(OBJ_DIR)/rtty.o \
|
||||
$(OBJ_DIR)/morse.o \
|
||||
$(OBJ_DIR)/feld.o \
|
||||
$(OBJ_DIR)/raster.o \
|
||||
$(OBJ_DIR)/feldfonts.o \
|
||||
$(OBJ_DIR)/analysis.o \
|
||||
$(OBJ_DIR)/throb.o \
|
||||
$(OBJ_DIR)/id.o \
|
||||
$(OBJ_DIR)/picture.o \
|
||||
$(OBJ_DIR)/samplerate.o \
|
||||
$(OBJ_DIR)/src_linear.o \
|
||||
$(OBJ_DIR)/src_sinc.o \
|
||||
$(OBJ_DIR)/src_zoh.o \
|
||||
$(OBJ_DIR)/combo.o \
|
||||
$(OBJ_DIR)/File_Selector.o \
|
||||
$(OBJ_DIR)/File_Selector2.o \
|
||||
$(OBJ_DIR)/file_dir.o \
|
||||
$(OBJ_DIR)/status.o \
|
||||
$(OBJ_DIR)/qrzcall.o \
|
||||
$(OBJ_DIR)/qrzlib.o \
|
||||
$(OBJ_DIR)/FreqControl.o \
|
||||
$(OBJ_DIR)/rigdialog.o \
|
||||
$(OBJ_DIR)/rigsupport.o \
|
||||
$(OBJ_DIR)/rigMEM.o \
|
||||
$(OBJ_DIR)/rigio.o \
|
||||
$(OBJ_DIR)/rigxml.o \
|
||||
$(OBJ_DIR)/serial.o\
|
||||
$(OBJ_DIR)/newinstall.o \
|
||||
$(OBJ_DIR)/colorbox.o\
|
||||
$(OBJ_DIR)/mixer.o
|
||||
|
||||
HAMLIB_OBJS = \
|
||||
$(OBJ_DIR)/hamlib.o \
|
||||
$(OBJ_DIR)/rigclass.o
|
||||
|
||||
define compile_source
|
||||
@echo Compiling $<
|
||||
@$(CC) $(C_INCLUDE_DIRS) $(CFLAGS) -c "$<" -o "$@"
|
||||
endef
|
||||
|
||||
.PHONY: print_header directories
|
||||
|
||||
ifeq ($(CTARG),hamlib)
|
||||
CFLAGS = $(CCFLAGS) -DPORTAUDIO
|
||||
LDFLAGS = $(DYN_LDFLAGS) -lportaudiocpp -lportaudio -lsndfile
|
||||
$(TARGET): print_header directories $(SRC_OBJS) $(HAMLIB_OBJS)
|
||||
$(CC) -s -o $(OUTPUT_DIR)/$(TARGET) $(SRC_OBJS) $(HAMLIB_OBJS) $(LDFLAGS) $(HAMLIBS)
|
||||
endif
|
||||
|
||||
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
|
||||
$(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
|
||||
OBJS = $(SRC_OBJS) $(HAMLIB_OBJS)
|
||||
$(TARGET): print_header directories $(SRC_OBJS) $(HAMLIB_OBJS)
|
||||
$(CC) -o $(OUTPUT_DIR)/$(TARGET) $(OBJS) $(LDFLAGS) $(HAMLIBS)
|
||||
endif
|
||||
|
||||
ifeq ($(CTARG),nhl)
|
||||
CFLAGS = $(CCFLAGS) -DNOHAMLIB -DPORTAUDIO
|
||||
LDFLAGS = $(DYN_LDFLAGS) -lportaudiocpp -lportaudio -lsndfile
|
||||
$(TARGET): print_header directories $(SRC_OBJS)
|
||||
$(CC) -s -o $(OUTPUT_DIR)/$(TARGET) $(SRC_OBJS) $(LDFLAGS)
|
||||
endif
|
||||
|
||||
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
|
||||
$(TARGET): print_header directories $(SRC_OBJS)
|
||||
$(CC) -s -o $(OUTPUT_DIR)/$(TARGET) $(SRC_OBJS) $(LDFLAGS) $(IMGLIBS)
|
||||
endif
|
||||
|
||||
ifeq ($(CTARG),nhl-debug)
|
||||
CFLAGS = $(CCFLAGS) -DNOHAMLIB -DPORTAUDIO -g
|
||||
LDFLAGS = $(DYN_LDFLAGS) -lportaudiocpp -lportaudio -lsndfile
|
||||
$(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)
|
||||
-@rm -rf $(OUTPUT_DIR)/$(TARGET)
|
||||
-@rm -rf *~
|
||||
|
||||
print_header:
|
||||
@echo --- Building fldigi
|
||||
@echo --- executable in directory $(OUTPUT_DIR)
|
||||
@echo --- object files in $(OBJ_DIR)
|
||||
|
||||
directories:
|
||||
-@if [ ! -d $(OUTPUT_DIR) ]; then mkdir $(OUTPUT_DIR); fi
|
||||
-@if [ ! -d $(OBJ_DIR) ]; then mkdir $(OBJ_DIR); fi
|
||||
|
||||
$(OBJ_DIR)/fft.o: src/fft/fft.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/waterfall.o: src/waterfall/waterfall.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/sound.o: src/soundcard/sound.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/fl_digi.o: src/dialogs/fl_digi.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/threads.o: src/misc/threads.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/viterbi.o: src/filters/viterbi.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/trx.o: src/trx/trx.cxx \
|
||||
src/trx/tune.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/psk.o: src/psk/psk.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/pskvaricode.o: src/psk/pskvaricode.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/pskcoeff.o: src/psk/pskcoeff.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/mfsk.o: src/mfsk/mfsk.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/interleave.o: src/mfsk/interleave.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/mfskvaricode.o: src/mfsk/mfskvaricode.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/ascii.o: src/misc/ascii.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/globals.o: src/globals/globals.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/modem.o: src/trx/modem.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/misc.o: src/misc/misc.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/fftfilt.o: src/filters/fftfilt.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/Config.o: src/dialogs/Config.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/configuration.o: src/misc/configuration.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/filters.o: src/filters/filters.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/TextView.o: src/dialogs/TextView.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/font_browser.o: src/dialogs/font_browser.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/macros.o: src/misc/macros.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/main.o: src/main.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/ptt.o: src/rigcontrol/ptt.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/digiscope.o: src/waterfall/digiscope.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/logger.o: src/logger/logger.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/rigclass.o: src/rigcontrol/rigclass.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/hamlib.o: src/rigcontrol/hamlib.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/olivia.o: src/olivia/olivia.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/dominoex.o: src/dominoex/dominoex.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/dominovar.o: src/dominoex/dominovar.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/wwv.o: src/wwv/wwv.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/log.o: src/misc/log.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/pskmail.o: src/misc/pskmail.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/cw.o: src/cw_rtty/cw.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/rtty.o: src/cw_rtty/rtty.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/morse.o: src/cw_rtty/morse.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/feld.o: src/feld/feld.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/raster.o: src/waterfall/raster.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/feldfonts.o: src/feld/feldfonts.cxx \
|
||||
src/feld/Feld7x7-14.cxx \
|
||||
src/feld/Feld7x7n-14.cxx \
|
||||
src/feld/FeldDx-14.cxx \
|
||||
src/feld/FeldFat-14.cxx \
|
||||
src/feld/FeldHell-12.cxx \
|
||||
src/feld/FeldLittle-12.cxx \
|
||||
src/feld/FeldLo8-14.cxx \
|
||||
src/feld/FeldLow-14.cxx \
|
||||
src/feld/FeldModern-14.cxx \
|
||||
src/feld/FeldModern8-14.cxx \
|
||||
src/feld/FeldNarr-14.cxx \
|
||||
src/feld/FeldReal-14.cxx \
|
||||
src/feld/FeldStyl-14.cxx \
|
||||
src/feld/FeldVert-14.cxx \
|
||||
src/feld/FeldWide-14.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/analysis.o: src/wwv/analysis.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/throb.o: src/throb/throb.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/id.o: src/ider/id.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/picture.o: src/widgets/picture.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/samplerate.o: src/samplerate/samplerate.c \
|
||||
src/samplerate/srconfig.h \
|
||||
src/samplerate/samplerate.h \
|
||||
src/samplerate/common.h \
|
||||
src/samplerate/float_cast.h
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/src_linear.o: src/samplerate/src_linear.c \
|
||||
src/samplerate/srconfig.h \
|
||||
src/samplerate/float_cast.h \
|
||||
src/samplerate/common.h \
|
||||
src/samplerate/samplerate.h
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/src_sinc.o: src/samplerate/src_sinc.c \
|
||||
src/samplerate/srconfig.h \
|
||||
src/samplerate/float_cast.h \
|
||||
src/samplerate/common.h \
|
||||
src/samplerate/samplerate.h \
|
||||
src/samplerate/fastest_coeffs.h
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/src_zoh.o: src/samplerate/src_zoh.c \
|
||||
src/samplerate/srconfig.h \
|
||||
src/samplerate/float_cast.h \
|
||||
src/samplerate/common.h \
|
||||
src/samplerate/samplerate.h
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/combo.o: src/combo/combo.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/File_Selector.o: src/fileselector/File_Selector.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/File_Selector2.o: src/fileselector/File_Selector2.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/file_dir.o: src/fileselector/file_dir.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/status.o: src/misc/status.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/qrzcall.o: src/misc/qrzcall.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/qrzlib.o: src/misc/qrzlib.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/FreqControl.o: src/rigcontrol/FreqControl.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/rigdialog.o: src/rigcontrol/rigdialog.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/rigsupport.o: src/rigcontrol/rigsupport.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/rigMEM.o: src/rigcontrol/rigMEM.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/rigio.o: src/rigcontrol/rigio.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/rigxml.o: src/rigcontrol/rigxml.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/serial.o: src/rigcontrol/serial.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/newinstall.o: src/misc/newinstall.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/colorbox.o: src/waterfall/colorbox.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/mixer.o: src/soundcard/mixer.cxx
|
||||
$(compile_source)
|
||||
|
||||
$(OBJ_DIR)/macroedit.o: src/misc/macroedit.cxx
|
||||
$(compile_source)
|
||||
|
|
@ -409,6 +409,7 @@ void textview::drawchars()
|
|||
size_t startidx = string::npos;
|
||||
size_t len = 0;
|
||||
char c = 0;
|
||||
int a = 0;
|
||||
char cstr[] = " ";
|
||||
|
||||
if ((len = buff.length()) == 0) {
|
||||
|
|
@ -433,18 +434,19 @@ void textview::drawchars()
|
|||
fl_push_clip( X, Y, W, H );
|
||||
|
||||
while (endidx < len) {
|
||||
fl_color(FL_WHITE);
|
||||
fl_rectf ( X + cursorX, Y + cursorY - charheight + descent, maxcharwidth, charheight);
|
||||
c = buff[endidx];
|
||||
a = attr[endidx];
|
||||
if (c == '\n') {
|
||||
cursorX = 0;
|
||||
cursorY += charheight;
|
||||
} else {
|
||||
cstr[0] = c;
|
||||
if ((attr[endidx] & 0x20) == 0x20)
|
||||
if ((a & 0x20) == 0x20)
|
||||
fl_color(FL_YELLOW);
|
||||
else
|
||||
fl_color(FL_WHITE);
|
||||
fl_rectf ( X + cursorX, Y + cursorY - charheight + descent, maxcharwidth, charheight);
|
||||
fl_color (TextColor[(int)attr[endidx] & 0x0F]);
|
||||
fl_color (TextColor[a & 0x0F]);
|
||||
fl_draw ( cstr, 1, X + cursorX, Y + cursorY );
|
||||
cursorX += (int)fl_width(c);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,7 +84,6 @@ cMixer mixer;
|
|||
|
||||
Fl_Button *btnTune = (Fl_Button *)0;
|
||||
Fl_Tile *TiledGroup = (Fl_Tile *)0;
|
||||
//Fl_Group *TiledGroup = (Fl_Group *)0;
|
||||
TextView *ReceiveText=(TextView *)0;
|
||||
TextEdit *TransmitText=(TextEdit *)0;
|
||||
Fl_Text_Buffer *rcvBuffer = (Fl_Text_Buffer *)0;
|
||||
|
|
@ -194,24 +193,23 @@ void clean_exit() {
|
|||
|
||||
mixer.closeMixer();
|
||||
active_modem->set_stopflag(true);
|
||||
MilliSleep(100);
|
||||
while (trx_state != STATE_RX)
|
||||
MilliSleep(100);
|
||||
|
||||
fl_lock (&trx_mutex);
|
||||
if (active_modem) {
|
||||
active_modem->shutdown();
|
||||
delete active_modem;
|
||||
}
|
||||
active_modem = (modem *) 0;
|
||||
fl_unlock (&trx_mutex);
|
||||
// fl_lock (&trx_mutex);
|
||||
// if (active_modem) {
|
||||
// active_modem->shutdown();
|
||||
// MilliSleep(100);
|
||||
// delete active_modem;
|
||||
// }
|
||||
// active_modem = (modem *) 0;
|
||||
// fl_unlock (&trx_mutex);
|
||||
|
||||
#ifndef NOHAMLIB
|
||||
delete xcvr;
|
||||
#endif
|
||||
delete push2talk;
|
||||
//#ifndef NOHAMLIB
|
||||
// delete xcvr;
|
||||
//#endif
|
||||
// delete push2talk;
|
||||
|
||||
// if (KeyLine)
|
||||
// delete KeyLine;
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
|
@ -1140,12 +1138,12 @@ void create_fl_digi_main() {
|
|||
|
||||
Fl_Group *qsoFrame2 = new Fl_Group(0,Y, WNOM, Hnotes);
|
||||
|
||||
inpNotes = new Fl_Input(136, Y, WNOM - 136 - 44 - 120, Hnotes,"Notes:"); // WA5ZNU
|
||||
inpNotes = new Fl_Input(136, Y, WNOM - 136 - 44 - 120, Hnotes,"Notes: ");
|
||||
inpNotes->align(FL_ALIGN_LEFT);
|
||||
|
||||
cboBand = new Fl_ComboBox(2, Y, 85, Hnotes, "");
|
||||
cboBand = new Fl_ComboBox(2, Y, 110, Hnotes, "");
|
||||
cboBand->hide();
|
||||
btnSideband = new Fl_Button(88, Y+1, 22, 22, "U");
|
||||
btnSideband = new Fl_Button(112, Y+1, Hnotes-2, Hnotes-2, "U");
|
||||
btnSideband->callback(cb_btnSideband, 0);
|
||||
btnSideband->hide();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
#ifndef ADIF_DEF
|
||||
#define ADIF_DEF
|
||||
#include "field_def.h"
|
||||
|
||||
struct FIELD {
|
||||
char *name;
|
||||
int size;
|
||||
};
|
||||
|
||||
extern FIELD fields[];
|
||||
|
||||
#endif
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
#ifndef ADIFIO
|
||||
#define ADIFIO
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "qso_db.h"
|
||||
|
||||
#define ADIF_VERS "2.0"
|
||||
|
||||
class cAdifIO {
|
||||
private:
|
||||
cQsoRec adifqso;
|
||||
FILE *adiFile;
|
||||
void fillfield(int, char *);
|
||||
public:
|
||||
cAdifIO () {};
|
||||
~cAdifIO () {};
|
||||
int readAdifRec () {return 0;};
|
||||
int writeAdifRec () {return 0;};
|
||||
int readFile (char *, cQsoDb *);
|
||||
int writeFile (char *, cQsoDb *);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef _VERSION_H
|
||||
#define _VERSION_H
|
||||
|
||||
#define FLDIGI_VERSION "1.37f-exp"
|
||||
#define FLDIGI_NAME "fldigi"
|
||||
#define FLDIGI_VERSION "1.37h"
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,173 +0,0 @@
|
|||
#include "adif_io.h"
|
||||
#include "version.h"
|
||||
|
||||
#include <FL/Fl.H>
|
||||
#include <FL/filename.H>
|
||||
|
||||
// These ADIF fields are a part of the QSO database
|
||||
|
||||
FIELD fields[] = {
|
||||
// NAME, SIZE
|
||||
{"ADDRESS", 40}, // 0 - contacted stations mailing address
|
||||
{"AGE", 3}, // 1 - contacted operators age in years
|
||||
{"ARRL_SECT", 12}, // 2 - contacted stations ARRL section
|
||||
{"BAND", 6}, // 3 - QSO band
|
||||
{"CALL", 10}, // 4 - contacted stations CALLSIGN
|
||||
{"CNTY", 20}, // 5 - secondary political subdivision, ie: STATE
|
||||
{"COMMENT", 80}, // 6 - comment field for QSO
|
||||
{"CONT", 10}, // 7 - contacted stations continent
|
||||
{"CONTEST_ID", 6}, // 8 - QSO contest identifier
|
||||
{"COUNTRY", 20}, // 9 - contacted stations DXCC entity name
|
||||
{"CQZ", 8}, // 10 - contacted stations CQ Zone
|
||||
{"DXCC", 8}, // 11 - contacted stations Country Code
|
||||
{"FREQ", 10}, // 12 - QSO frequency in Mhz
|
||||
{"GRIDSQUARE", 6}, // 13 - contacted stations Maidenhead Grid Square
|
||||
{"MODE", 8}, // 14 - QSO mode
|
||||
{"NAME", 18}, // 15 - contacted operators NAME
|
||||
{"NOTES", 80}, // 16 - QSO notes
|
||||
{"QSLRDATE", 8}, // 17 - QSL received date
|
||||
{"QSLSDATE", 8}, // 18 - QSL sent date
|
||||
{"QSL_RCVD", 1}, // 19 - QSL received status
|
||||
{"QSL_SENT", 1}, // 20 - QSL sent status
|
||||
{"QSO_DATE", 8}, // 21 - QSO data
|
||||
{"QTH", 30}, // 22 - contacted stations city
|
||||
{"RST_RCVD", 3}, // 23 - received signal report
|
||||
{"RST_SENT", 3}, // 24 - sent signal report
|
||||
{"STATE", 2}, // 25 - contacted stations STATE
|
||||
{"STX", 8}, // 26 - QSO transmitted serial number
|
||||
{"TIME_OFF", 4}, // 27 - HHMM or HHMMSS in UTC
|
||||
{"TIME_ON", 4}, // 28 - HHMM or HHMMSS in UTC
|
||||
{"TX_PWR", 4} // 29 - power transmitted by this station
|
||||
};
|
||||
|
||||
int fieldnbr (char *s) {
|
||||
for (int i = 0; i < NUMFIELDS; i++)
|
||||
if (strncasecmp( fields[i].name, s, fields[i].size) == 0)
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int findfield (char *p) {
|
||||
for (int i=0; i < NUMFIELDS; i++)
|
||||
if (strncasecmp (p, fields[i].name, strlen(fields[i].name)) == 0)
|
||||
return i;
|
||||
if (strncasecmp (p, "EOR>", 4) == 0)
|
||||
return -1;
|
||||
return -2;
|
||||
}
|
||||
|
||||
void cAdifIO::fillfield (int fieldnum, char *buff){
|
||||
char *p = buff;
|
||||
char numeral[8];
|
||||
int n, fldsize;
|
||||
memset (numeral, 0, 8);
|
||||
n = 0;
|
||||
while (*p != ':' && n < 10) {p++; n++;}
|
||||
if (n == 10) return; // bad ADIF specifier ---> no ':' after field name
|
||||
// found first ':'
|
||||
p++;
|
||||
n = 0;
|
||||
while (*p >= '0' && *p <= '9' && n < 8) {
|
||||
numeral[n++] = *p;
|
||||
p++;
|
||||
}
|
||||
fldsize = atoi(numeral);
|
||||
p = strchr(buff,'>'); // end of specifier +1 == > start of data
|
||||
if (!p) return;
|
||||
p++;
|
||||
char *flddata = new char[fldsize+1];
|
||||
memset (flddata, 0, fldsize + 1);
|
||||
strncpy (flddata, p, fldsize);
|
||||
adifqso.putField (fieldnum, (const char *)flddata);
|
||||
}
|
||||
|
||||
int cAdifIO::readFile (char *fname, cQsoDb *db) {
|
||||
long filesize = 0;
|
||||
char *buff;
|
||||
int found;
|
||||
// open the adif file
|
||||
adiFile = fopen (fname, "r");
|
||||
if (!adiFile)
|
||||
return 1;
|
||||
// determine its size for buffer creation
|
||||
fseek (adiFile, 0, SEEK_END);
|
||||
filesize = ftell (adiFile);
|
||||
buff = new char[filesize + 1];
|
||||
// read the entire file into the buffer
|
||||
fseek (adiFile, 0, SEEK_SET);
|
||||
fread (buff, filesize, 1, adiFile);
|
||||
fclose (adiFile);
|
||||
|
||||
char *p1 = buff, *p2;
|
||||
// is there a header?
|
||||
if (*p1 != '<') { // yes find the start of the records
|
||||
p1 = strchr(buff, '<');
|
||||
while (strncasecmp (p1+1,"EOH>", 4) != 0) {
|
||||
p1 = strchr(p1+1, '<'); // find next <> field
|
||||
}
|
||||
if (!p1) return 1; // must not be an ADIF compliant file
|
||||
p1 += 1;
|
||||
}
|
||||
|
||||
p2 = strchr(p1,'<'); // find first ADIF specifier
|
||||
adifqso.clearRec();
|
||||
while (p2) {
|
||||
found = findfield(p2+1);
|
||||
if (found > -1)
|
||||
fillfield (found, p2+1);
|
||||
else if (found == -1) { // <eor> reached; add this record to db
|
||||
db->qsoNewRec (&adifqso);
|
||||
adifqso.clearRec();
|
||||
}
|
||||
else
|
||||
return 1; // corrupt file or end of records
|
||||
p1 = p2 + 1;
|
||||
p2 = strchr(p1,'<');
|
||||
}
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
char *ADIFHEADER = "\
|
||||
ADIF Export from fldigi\n\
|
||||
w1hkj@w1hkj.com\n\
|
||||
File: %s\n\
|
||||
<ADIF_VERS:%d>%s\n\
|
||||
<PROGRAMID:7>logbook\n\
|
||||
<PROGRAMVERSION:%d>%s\n\
|
||||
<EOH>\n\n";
|
||||
|
||||
|
||||
int cAdifIO::writeFile (char *fname, cQsoDb *db) {
|
||||
// open the adif file
|
||||
char *szFld;
|
||||
cQsoRec *rec;
|
||||
adiFile = fopen (fname, "r");
|
||||
if (!adiFile) {
|
||||
adiFile = fopen(fname,"w");
|
||||
if (!adiFile)
|
||||
return 1;
|
||||
fprintf (adiFile, ADIFHEADER,
|
||||
fl_filename_name(fname),
|
||||
strlen(ADIF_VERS), ADIF_VERS,
|
||||
strlen(VERSION), VERSION);
|
||||
fclose(adiFile);
|
||||
}
|
||||
adiFile = fopen (fname, "a");
|
||||
if (!adiFile)
|
||||
return 1;
|
||||
// write the current record to the file
|
||||
// for (int i = 0; i < db->nbrRecs(); i++) {
|
||||
// rec = db->getRec(i);
|
||||
// for (int j=0; j < NUMFIELDS; j++) {
|
||||
// szFld = rec->getField(j);
|
||||
// if (strlen(szFld))
|
||||
// fprintf(adiFile,
|
||||
// "<%s:%d>%s ", fields[j].name, strlen(szFld), szFld);
|
||||
// }
|
||||
// fprintf(adiFile, "<EOR>\n");
|
||||
// }
|
||||
fclose (adiFile);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -80,7 +80,7 @@ static string adif;
|
|||
|
||||
const char *ADIFHEADER =
|
||||
"<ADIF_VERS:%d>%s\n\
|
||||
<PROGRAMID:7>fldigi\n\
|
||||
<PROGRAMID:%d>%s\n\
|
||||
<PROGRAMVERSION:%d>%s\n\
|
||||
<EOH>\n\n";
|
||||
|
||||
|
|
@ -97,6 +97,7 @@ int writeadif () {
|
|||
return 1;
|
||||
fprintf (adiFile, ADIFHEADER,
|
||||
strlen(ADIF_VERS), ADIF_VERS,
|
||||
strlen(FLDIGI_NAME), FLDIGI_NAME,
|
||||
strlen(FLDIGI_VERSION), FLDIGI_VERSION);
|
||||
fclose(adiFile);
|
||||
} else
|
||||
|
|
@ -156,7 +157,7 @@ int submit_log(void)
|
|||
|
||||
Fl::lock();
|
||||
log_msg = "";
|
||||
log_msg = log_msg + "program:" + "fldigi v " + FLDIGI_VERSION + LOG_MSEPARATOR;
|
||||
log_msg = log_msg + "program:" + FLDIGI_NAME + " v " + FLDIGI_VERSION + LOG_MSEPARATOR;
|
||||
log_msg = log_msg + "version:" + LOG_MVERSION + LOG_MSEPARATOR;
|
||||
log_msg = log_msg + "date:" + logdate + LOG_MSEPARATOR;
|
||||
putadif(21, adifdate);
|
||||
|
|
|
|||
|
|
@ -340,8 +340,8 @@ void psk::afc()
|
|||
if (error > M_PI / 2)
|
||||
error -= 2 * M_PI;
|
||||
error *= ((samplerate / (symbollen * 2 * M_PI)/16));
|
||||
if (fabs(error) < (bandwidth / 2.0)) {
|
||||
freqerr = decayavg( freqerr, error, 32);
|
||||
if (fabs(error) < bandwidth) {
|
||||
freqerr = decayavg( freqerr, error, 8);
|
||||
frequency -= freqerr;
|
||||
// frequency -= error;
|
||||
set_freq (frequency);
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue