diff -Nru flmsg-4.0.14/ChangeLog flmsg-4.0.17/ChangeLog --- flmsg-4.0.14/ChangeLog 2019-08-05 14:21:06.000000000 +0000 +++ flmsg-4.0.17/ChangeLog 2020-09-08 22:33:10.000000000 +0000 @@ -1,8 +1,31 @@ -=Version 4.0.14= +=Version 4.0.17= + +2020-09-08 Richard Shaw + + 887f4704: Seg fault on Send bug + 7dbf6ccd: Memory leaks + + +=Version 4.0.16= + + +2020-06-25 David Freese -2019-08-02 David Freese + 81cf3170: Mars Army + 13f5b22b: custom form + + +=Version 4.0.15= + + e222a9dd: Custom Form Download + bb858a20: xmlrpc io + 5a6aafaf: Default Folder + 21b1305e: fltk version change + + +=Version 4.0.14= 5332f02e: xmlrpc thread isolation diff -Nru flmsg-4.0.14/configure flmsg-4.0.17/configure --- flmsg-4.0.14/configure 2019-08-05 14:25:00.000000000 +0000 +++ flmsg-4.0.17/configure 2020-09-08 22:33:24.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for FLMSG 4.0.14. +# Generated by GNU Autoconf 2.69 for FLMSG 4.0.17. # # Report bugs to . # @@ -582,8 +582,8 @@ # Identity of this package. PACKAGE_NAME='FLMSG' PACKAGE_TARNAME='flmsg' -PACKAGE_VERSION='4.0.14' -PACKAGE_STRING='FLMSG 4.0.14' +PACKAGE_VERSION='4.0.17' +PACKAGE_STRING='FLMSG 4.0.17' PACKAGE_BUGREPORT='w1hkj AT w1hkj DOT com' PACKAGE_URL='' @@ -1377,7 +1377,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures FLMSG 4.0.14 to adapt to many kinds of systems. +\`configure' configures FLMSG 4.0.17 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1449,7 +1449,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of FLMSG 4.0.14:";; + short | recursive ) echo "Configuration of FLMSG 4.0.17:";; esac cat <<\_ACEOF @@ -1577,7 +1577,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -FLMSG configure 4.0.14 +FLMSG configure 4.0.17 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2086,7 +2086,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by FLMSG $as_me 4.0.14, which was +It was created by FLMSG $as_me 4.0.17, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2439,9 +2439,9 @@ FLMSG_VERSION_MINOR=0 -FLMSG_VERSION_PATCH=.14 +FLMSG_VERSION_PATCH=.17 -FLMSG_VERSION=4.0.14 +FLMSG_VERSION=4.0.17 @@ -2451,10 +2451,10 @@ $as_echo "#define FLMSG_VERSION_MINOR 0" >>confdefs.h -$as_echo "#define FLMSG_VERSION_PATCH \".14\"" >>confdefs.h +$as_echo "#define FLMSG_VERSION_PATCH \".17\"" >>confdefs.h -$as_echo "#define FLMSG_VERSION \"4.0.14\"" >>confdefs.h +$as_echo "#define FLMSG_VERSION \"4.0.17\"" >>confdefs.h AC_CONFIG_ARGS=$ac_configure_args @@ -3089,7 +3089,7 @@ # Define the identity of the package. PACKAGE='flmsg' - VERSION='4.0.14' + VERSION='4.0.17' cat >>confdefs.h <<_ACEOF @@ -6168,7 +6168,7 @@ if test $? -ne 0; then as_fn_error $? "$FLTK_CONFIG failed" "$LINENO" 5 fi - if test "x$FLTK_API_VERSION" = "x1.1" || test "x$FLTK_API_VERSION" = "x1.3"; then + if test -n "$(expr $FLTK_API_VERSION : '1\.13')"; then HAVE_FLTK_API_VERSION=yes fi @@ -7544,7 +7544,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by FLMSG $as_me 4.0.14, which was +This file was extended by FLMSG $as_me 4.0.17, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -7610,7 +7610,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -FLMSG config.status 4.0.14 +FLMSG config.status 4.0.17 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru flmsg-4.0.14/configure.ac flmsg-4.0.17/configure.ac --- flmsg-4.0.14/configure.ac 2019-08-05 14:19:22.000000000 +0000 +++ flmsg-4.0.17/configure.ac 2020-09-08 22:33:10.000000000 +0000 @@ -12,7 +12,7 @@ dnl contain other characters or be empty m4_define(FLMSG_MAJOR, [4]) m4_define(FLMSG_MINOR, [0]) -m4_define(FLMSG_PATCH, [.14]) +m4_define(FLMSG_PATCH, [.17]) AC_INIT([FLMSG], FLMSG_MAJOR.FLMSG_MINOR[]FLMSG_PATCH, [w1hkj AT w1hkj DOT com]) diff -Nru flmsg-4.0.14/debian/changelog flmsg-4.0.17/debian/changelog --- flmsg-4.0.14/debian/changelog 2020-03-22 15:40:35.000000000 +0000 +++ flmsg-4.0.17/debian/changelog 2020-09-11 11:15:32.000000000 +0000 @@ -1,8 +1,26 @@ -flmsg (4.0.14-1build1) focal; urgency=medium +flmsg (4.0.17-1) unstable; urgency=medium - * No-change rebuild for libgcc-s1 package name change. + * Team upload with new upstream version 4.0.17. + * Add sensible-utils and xdg-utils to recommends, flmsg uses + sensible-browser and xdg-open. - -- Matthias Klose Sun, 22 Mar 2020 16:40:35 +0100 + -- Christoph Berg Fri, 11 Sep 2020 13:15:32 +0200 + +flmsg (4.0.16-1) unstable; urgency=medium + + * Team upload. + + [ Debian Janitor ] + * Use secure copyright file specification URI. + * debian/copyright: use spaces rather than tabs to start continuation + lines. + * Set upstream metadata fields: Archive, Bug-Submit (from + ./configure). + + [ Christoph Berg ] + * New upstream version 4.0.16. + + -- Christoph Berg Tue, 08 Sep 2020 23:27:58 +0200 flmsg (4.0.14-1) unstable; urgency=medium diff -Nru flmsg-4.0.14/debian/control flmsg-4.0.17/debian/control --- flmsg-4.0.14/debian/control 2019-12-30 17:29:20.000000000 +0000 +++ flmsg-4.0.17/debian/control 2020-09-11 11:08:51.000000000 +0000 @@ -9,7 +9,7 @@ libflxmlrpc-dev, libx11-dev, pkg-config, -Standards-Version: 4.4.1 +Standards-Version: 4.5.0 Homepage: http://www.w1hkj.com/flmsg-help/ Vcs-Git: https://salsa.debian.org/debian-hamradio-team/flmsg.git Vcs-Browser: https://salsa.debian.org/debian-hamradio-team/flmsg @@ -17,6 +17,9 @@ Package: flmsg Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} +Recommends: + sensible-utils, + xdg-utils, Enhances: fldigi Suggests: fldigi Description: amateur radio forms management editor diff -Nru flmsg-4.0.14/debian/copyright flmsg-4.0.17/debian/copyright --- flmsg-4.0.14/debian/copyright 2019-02-02 19:44:50.000000000 +0000 +++ flmsg-4.0.17/debian/copyright 2020-09-11 11:07:41.000000000 +0000 @@ -1,4 +1,4 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: flmsg Upstream-Contact: Dave Freese Source: http://www.w1hkj.com/ @@ -30,13 +30,13 @@ Files: src/utils/threads.cxx Copyright: 2007-2009 Stelios Bounanos, M0GLD - 2014 David Freese, W1HKJ + 2014 David Freese, W1HKJ License: GPL-3+ Files: src/utils/mongoose.c src/include/mongoose.h Copyright: 2004-2013 Sergey Lyubka - 2013-2014 Cesanta Software Limited - Steve Reid + 2013-2014 Cesanta Software Limited + Steve Reid License: GPL-2 On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". diff -Nru flmsg-4.0.14/debian/upstream/metadata flmsg-4.0.17/debian/upstream/metadata --- flmsg-4.0.14/debian/upstream/metadata 1970-01-01 00:00:00.000000000 +0000 +++ flmsg-4.0.17/debian/upstream/metadata 2020-09-11 11:07:41.000000000 +0000 @@ -0,0 +1,2 @@ +Archive: SourceForge +Bug-Submit: w1hkj AT w1hkj DOT com diff -Nru flmsg-4.0.14/m4/fltk.m4 flmsg-4.0.17/m4/fltk.m4 --- flmsg-4.0.14/m4/fltk.m4 2019-05-25 01:39:03.000000000 +0000 +++ flmsg-4.0.17/m4/fltk.m4 2020-04-05 12:45:49.000000000 +0000 @@ -22,7 +22,7 @@ if test $? -ne 0; then AC_MSG_ERROR([$FLTK_CONFIG failed]) fi - if test "x$FLTK_API_VERSION" = "x1.1" || test "x$FLTK_API_VERSION" = "x1.3"; then + if test -n "$(expr $FLTK_API_VERSION : '1\.1[3]')"; then HAVE_FLTK_API_VERSION=yes fi diff -Nru flmsg-4.0.14/scripts/builddist.sh flmsg-4.0.17/scripts/builddist.sh --- flmsg-4.0.14/scripts/builddist.sh 2019-05-25 01:39:03.000000000 +0000 +++ flmsg-4.0.17/scripts/builddist.sh 2020-09-08 23:21:19.000000000 +0000 @@ -7,10 +7,10 @@ $CROSSCFG \ --with-ptw32=$PREFIX/i686-w64-mingw32.static \ --enable-static \ - PTW32_LIBS="-lpthread -lpcreposix -lpcre -lregex" \ - FLTK_CONFIG=$PREFIX/bin/i686-w64-mingw32.static-fltk-config \ + PTW32_LIBS="-lpthread -lpcreposix -lpcre" \ + FLTK_CONFIG=$PREFIX/bin/i686-w64-mingw32.static-fltk-config -make +make -j 4 $PREFIX/bin/i686-w64-mingw32.static-strip src/flmsg.exe make nsisinst diff -Nru flmsg-4.0.14/scripts/buildmxe.sh flmsg-4.0.17/scripts/buildmxe.sh --- flmsg-4.0.14/scripts/buildmxe.sh 2019-05-25 01:39:03.000000000 +0000 +++ flmsg-4.0.17/scripts/buildmxe.sh 2020-09-08 23:21:22.000000000 +0000 @@ -2,17 +2,17 @@ ### Script to build a win32 installation +make clean + ./configure \ $PKGCFG \ $CROSSCFG \ --with-ptw32=$PREFIX/i686-w64-mingw32.static \ --enable-static \ - PTW32_LIBS="-lpthread -lpcreposix -lpcre -lregex" \ - FLTK_CONFIG=$PREFIX/bin/i686-w64-mingw32.static-fltk-config \ - -make clean + PTW32_LIBS="-lpthread -lpcreposix -lpcre" \ + FLTK_CONFIG=$PREFIX/bin/i686-w64-mingw32.static-fltk-config -make +make -j 4 $PREFIX/bin/i686-w64-mingw32.static-strip src/flmsg.exe make nsisinst diff -Nru flmsg-4.0.14/scripts/mkappbundle.sh flmsg-4.0.17/scripts/mkappbundle.sh --- flmsg-4.0.14/scripts/mkappbundle.sh 2019-05-25 01:39:03.000000000 +0000 +++ flmsg-4.0.17/scripts/mkappbundle.sh 2020-02-10 13:04:43.000000000 +0000 @@ -111,7 +111,7 @@ signature="$PACKAGE_TARNAME" binary="$PACKAGE_TARNAME" icon="$flmsg_icon" -version="${flmsg_VERSION_MAJOR}.${flmsg_VERSION_MINOR}" +version="${flmsg_VERSION_MAJOR}.${flmsg_VERSION_MINOR}.${flmsg_VERSION_PATCH}" appversion="$flmsg_VERSION" bundle diff -Nru flmsg-4.0.14/src/arq/arq.cxx flmsg-4.0.17/src/arq/arq.cxx --- flmsg-4.0.14/src/arq/arq.cxx 2019-08-02 19:57:29.000000000 +0000 +++ flmsg-4.0.17/src/arq/arq.cxx 2020-05-01 15:13:54.000000000 +0000 @@ -888,7 +888,8 @@ int looptime = ARQLOOPTIME; while (1) { - MilliSleep(looptime); + MilliSleep( + inst->LinkState == arq::ARQ_DOWN ? looptime * 10 : looptime); if (inst->arq_exit) break; { guard_lock arqlock( &arq_mutex ); diff -Nru flmsg-4.0.14/src/arq/flmsg-arq.cxx flmsg-4.0.17/src/arq/flmsg-arq.cxx --- flmsg-4.0.14/src/arq/flmsg-arq.cxx 2019-08-02 19:57:44.000000000 +0000 +++ flmsg-4.0.17/src/arq/flmsg-arq.cxx 2020-09-08 20:02:53.000000000 +0000 @@ -593,7 +593,7 @@ ofstream logfile(logname.c_str(), ios::app); if (logfile){ logfile << txtout; - if (s[s.length()-1] != '\n') logfile << endl; + if (s.length() == 0 || s[s.length()-1] != '\n') logfile << endl; } logfile.close(); diff -Nru flmsg-4.0.14/src/config.h flmsg-4.0.17/src/config.h --- flmsg-4.0.14/src/config.h 2019-08-05 14:28:14.000000000 +0000 +++ flmsg-4.0.17/src/config.h 2020-09-08 23:22:26.000000000 +0000 @@ -5,31 +5,31 @@ #define BUILD_BUILD_PLATFORM "x86_64-pc-linux-gnu" /* Compiler */ -#define BUILD_COMPILER "gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1) " +#define BUILD_COMPILER "gcc version 5.5.0 (GCC) " /* Configure arguments */ -#define BUILD_CONFIGURE_ARGS "'PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/:/usr/local/lib64/pkgconfig/'" +#define BUILD_CONFIGURE_ARGS "'PKG_CONFIG=/home/dave/mxe/usr/bin/i686-w64-mingw32.static-pkg-config' '--host=i686-w64-mingw32.static' '--with-ptw32=/home/dave/mxe/usr/i686-w64-mingw32.static' '--enable-static' 'PTW32_LIBS=-lpthread -lpcreposix -lpcre' 'FLTK_CONFIG=/home/dave/mxe/usr/bin/i686-w64-mingw32.static-fltk-config' 'host_alias=i686-w64-mingw32.static' 'PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/:/usr/local/lib64/pkgconfig/'" /* Build date */ -#define BUILD_DATE "Mon Aug 5 09:28:14 CDT 2019" +#define BUILD_DATE "Tue Sep 8 18:22:26 CDT 2020" /* Build host */ #define BUILD_HOST "m90p" /* Host platform */ -#define BUILD_HOST_PLATFORM "x86_64-pc-linux-gnu" +#define BUILD_HOST_PLATFORM "i686-w64-mingw32.static" /* Target platform */ -#define BUILD_TARGET_PLATFORM "x86_64-pc-linux-gnu" +#define BUILD_TARGET_PLATFORM "i686-w64-mingw32.static" /* Build user */ #define BUILD_USER "dave" /* FLMSG compiler flags */ -#define FLMSG_BUILD_CXXFLAGS "-I$(srcdir) -I$(srcdir)/include -I$(srcdir)/xmlrpcpp -I$(srcdir)/xmlrpcpp -I/usr/local/include -I/usr/local/include/FL/images -I/usr/include/freetype2 -I/usr/include/libpng16 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT -I$(srcdir) -I$(srcdir)/include -pipe -Wall -fexceptions -O2 -ffast-math -finline-functions -fomit-frame-pointer -DNDEBUG" +#define FLMSG_BUILD_CXXFLAGS "-I$(srcdir) -I$(srcdir)/include -I$(srcdir)/xmlrpcpp -D_WINDOWS -mthreads -I$(srcdir)/xmlrpcpp -I/home/dave/mxe.git/usr/i686-w64-mingw32.static/include -mwindows -DWIN32 -DUSE_OPENGL32 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I$(srcdir) -I$(srcdir)/include -pipe -Wall -fexceptions -O2 -ffast-math -finline-functions -fomit-frame-pointer -DPTW32_STATIC_LIB -I/home/dave/mxe/usr/i686-w64-mingw32.static/include -DNDEBUG" /* FLMSG linker flags */ -#define FLMSG_BUILD_LDFLAGS "-L/usr/local/lib -lfltk_images -lpng -lz -lfltk_jpeg -lfltk -lXrender -lXft -lfontconfig -lpthread -ldl -lm -lX11 -lX11 -ldl -lpthread" +#define FLMSG_BUILD_LDFLAGS "-mthreads -mwindows /home/dave/mxe.git/usr/i686-w64-mingw32.static/lib/libfltk_images.a -lpng -lz -ljpeg /home/dave/mxe.git/usr/i686-w64-mingw32.static/lib/libfltk.a -ldl -lws2_32 -lole32 -luuid -lcomctl32 -lpthread -lpcreposix -lpcre" /* FLTK API major version */ #define FLMSG_FLTK_API_MAJOR 1 @@ -38,10 +38,10 @@ #define FLMSG_FLTK_API_MINOR 3 /* FLTK API patch */ -#define FLMSG_FLTK_API_PATCH 4 +#define FLMSG_FLTK_API_PATCH 5 /* version string */ -#define FLMSG_VERSION "4.0.14" +#define FLMSG_VERSION "4.0.17" /* major version number */ #define FLMSG_VERSION_MAJOR 4 @@ -50,10 +50,10 @@ #define FLMSG_VERSION_MINOR 0 /* patch/alpha version string */ -#define FLMSG_VERSION_PATCH ".14" +#define FLMSG_VERSION_PATCH ".17" /* FLTK version */ -#define FLTK_BUILD_VERSION "1.3.4" +#define FLTK_BUILD_VERSION "1.3.5" /* flxmlrpc version */ #define FLXMLRPC_BUILD_VERSION "" @@ -68,22 +68,22 @@ #define HAVE_DLOPEN 1 /* Define to 1 if you have the `getaddrinfo' function. */ -#define HAVE_GETADDRINFO 1 +/* #undef HAVE_GETADDRINFO */ /* Define to 1 if you have the `gethostbyname' function. */ -#define HAVE_GETHOSTBYNAME 1 +/* #undef HAVE_GETHOSTBYNAME */ /* Define to 1 if you have the `gmtime_r' function. */ -#define HAVE_GMTIME_R 1 +/* #undef HAVE_GMTIME_R */ /* Define to 1 if you have the `hstrerror' function. */ -#define HAVE_HSTRERROR 1 +/* #undef HAVE_HSTRERROR */ /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 /* Define to 1 if you have the `localtime_r' function. */ -#define HAVE_LOCALTIME_R 1 +/* #undef HAVE_LOCALTIME_R */ /* Define to 1 if you have the `memmove' function. */ #define HAVE_MEMMOVE 1 @@ -98,7 +98,7 @@ #define HAVE_MKDIR 1 /* Define to 1 if you have the `select' function. */ -#define HAVE_SELECT 1 +/* #undef HAVE_SELECT */ /* Define to 1 if we have sem_timedwait */ #define HAVE_SEM_TIMEDWAIT 1 @@ -107,16 +107,16 @@ #define HAVE_SEM_UNLINK 1 /* Define to 1 if you have the `setenv' function. */ -#define HAVE_SETENV 1 +/* #undef HAVE_SETENV */ /* Define to 1 if you have the `snprintf' function. */ #define HAVE_SNPRINTF 1 /* Define to 1 if you have the `socket' function. */ -#define HAVE_SOCKET 1 +/* #undef HAVE_SOCKET */ /* Define to 1 if you have the `socketpair' function. */ -#define HAVE_SOCKETPAIR 1 +/* #undef HAVE_SOCKETPAIR */ /* Define to 1 if stdbool.h conforms to C99. */ #define HAVE_STDBOOL_H 1 @@ -131,7 +131,7 @@ #define HAVE_STRCASECMP 1 /* Define to 1 if you have the `strcasestr' function. */ -#define HAVE_STRCASESTR 1 +/* #undef HAVE_STRCASESTR */ /* Define to 1 if you have the `strchr' function. */ #define HAVE_STRCHR 1 @@ -170,13 +170,13 @@ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the `uname' function. */ -#define HAVE_UNAME 1 +/* #undef HAVE_UNAME */ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 /* Define to 1 if you have the `unsetenv' function. */ -#define HAVE_UNSETENV 1 +/* #undef HAVE_UNSETENV */ /* Define to 1 if you have the `vsnprintf' function. */ #define HAVE_VSNPRINTF 1 @@ -194,7 +194,7 @@ #define PACKAGE_NAME "FLMSG" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "FLMSG 4.0.14" +#define PACKAGE_STRING "FLMSG 4.0.17" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "flmsg" @@ -203,7 +203,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "4.0.14" +#define PACKAGE_VERSION "4.0.17" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -234,13 +234,13 @@ /* Define to 1 if we are using x */ -#define USE_X 1 +/* #undef USE_X */ /* Version number of package */ -#define VERSION "4.0.14" +#define VERSION "4.0.17" /* x version */ -#define X_BUILD_VERSION "1.6.4" +/* #undef X_BUILD_VERSION */ /* Define to 1 if on MINIX. */ /* #undef _MINIX */ @@ -253,13 +253,13 @@ /* #undef _POSIX_SOURCE */ /* Define to 1 if we are building on cygwin or mingw */ -/* #undef _WINDOWS */ +#define _WINDOWS 1 /* Define to 1 if we are building on cygwin or mingw */ -/* #undef __MINGW32__ */ +#define __MINGW32__ 1 /* Define to 1 if we are building on mingw */ -/* #undef __WOE32__ */ +#define __WOE32__ 1 /* Define to `unsigned int' if does not define. */ /* #undef size_t */ diff -Nru flmsg-4.0.14/src/csv/csv.cxx flmsg-4.0.17/src/csv/csv.cxx --- flmsg-4.0.14/src/csv/csv.cxx 2019-05-25 01:38:29.000000000 +0000 +++ flmsg-4.0.17/src/csv/csv.cxx 2020-09-08 22:32:12.000000000 +0000 @@ -396,7 +396,6 @@ // open the CSV file, read all data long filesize = 0; - char *buff; FILE *csv_datafile; csv_datafile = fopen (p, "rb"); @@ -410,10 +409,11 @@ // test file integrity if (filesize == 0) { fl_alert2(_("Empty file")); + fclose(csv_datafile); return; } - buff = new char[filesize + 1]; + char *buff = new char[filesize + 1]; memset(buff, 0, filesize + 1); // read the entire file into the buffer fseek (csv_datafile, 0, SEEK_SET); @@ -422,6 +422,7 @@ if (retval != filesize) { fl_alert2(_("Error reading file")); + delete[] buff; return; } diff -Nru flmsg-4.0.14/src/custom/custom.cxx flmsg-4.0.17/src/custom/custom.cxx --- flmsg-4.0.14/src/custom/custom.cxx 2019-08-01 13:00:44.000000000 +0000 +++ flmsg-4.0.17/src/custom/custom.cxx 2020-07-22 15:35:57.000000000 +0000 @@ -214,9 +214,13 @@ s2.assign(s); size_t p1 = s2.ufind(" #include +#include + #include "gettext.h" #include "flmsg_arq.h" #include "flmsg_dialog.h" +#include "drop_button.h" #include "status.h" #include "flmsg.h" @@ -46,8 +49,8 @@ Fl_Menu_Bar *ve_menubar = (Fl_Menu_Bar *)0; Fl_ComboBox *temp_combo = (Fl_ComboBox *)0; Fl_Button *ve_create = (Fl_Button *)0; -Fl_Button *ve_editor = (Fl_Button *)0; -Fl_Button *ve_viewer = (Fl_Button *)0; +Fl_Drop_Button *ve_editor = (Fl_Drop_Button *)0; +Fl_Drop_Button *ve_viewer = (Fl_Drop_Button *)0; //====================================================================== @@ -1880,14 +1883,27 @@ { string filename = ICS_dir; filename.append("MARS_ROSTER.csv"); - const char *p = FSEL::select( - "Select MARS roster file", - "csv file\t*.{csv,CSV}", - filename.c_str()); - if (p) { - progStatus.mars_roster_file = p; - txt_mars_roster_file->value(p); + + Fl_Native_File_Chooser native; + + native.filter("csv file\t*.{csv,CSV}"); + native.title(_("Select MARS roster file")); + native.preset_file(filename.c_str()); + native.type(Fl_Native_File_Chooser::BROWSE_FILE); + native.options(Fl_Native_File_Chooser::PREVIEW); + native.directory(ICS_dir.c_str()); + + switch ( native.show() ) { + case -1: // ERROR + LOG_ERROR("ERROR: %s\n", native.errmsg()); // Error fall through + case 1: // CANCEL + break; + default: + progStatus.mars_roster_file = native.filename(); + txt_mars_roster_file->value(progStatus.mars_roster_file.c_str()); + break; } + } void cb_autowordwrap() @@ -2201,7 +2217,7 @@ Fl_Group *grp = new Fl_Group(X, Y, W, H, title); Y += 20; - X += 80; + X += 90; btn_UI = new Fl_Check_Button(X, Y, 22, 22, _("User Interface = expert")); btn_UI->tooltip(_("\ Startup User Interface:\n\ @@ -2435,39 +2451,113 @@ custom_msg_dialog->show(); } +#include + void cb_ve_viewer(void *) { + int event = Fl::event(); + if (event == FL_PASTE) { + cmd_fname = Fl::event_text(); + size_t n; + if ((n = cmd_fname.find("file:///")) != string::npos) + cmd_fname.erase(0, n + 7); + if ((cmd_fname.find(":\\")) != string::npos || (cmd_fname.find("/") == 0)) { + while ((n = cmd_fname.find('\n')) != string::npos) + cmd_fname.erase(n, 1); + while ((n = cmd_fname.find('\r')) != string::npos) + cmd_fname.erase(n, 1); + print_and_exit(); + } else + cmd_fname.clear(); + return; + } + string viewer_filename = ICS_msg_dir; - const char *p = FSEL::select(_("Open data file"), "All msgs\t*.*", - viewer_filename.c_str()); - if (!p) return; - if (strlen(p) == 0) return; - cmd_fname = p; - print_and_exit(); + + Fl_Native_File_Chooser native; + + native.filter("All msgs\t*\n"); + native.title(_("Open data file")); + native.preset_file(viewer_filename.c_str()); + native.type(Fl_Native_File_Chooser::BROWSE_FILE); + native.options(Fl_Native_File_Chooser::PREVIEW); + native.directory(ICS_msg_dir.c_str()); + + switch ( native.show() ) { + case -1: // ERROR + LOG_ERROR("ERROR: %s\n", native.errmsg()); // Error fall through + case 1: // CANCEL + break; + default: + cmd_fname = viewer_filename = native.filename(); + print_and_exit(); + break; + } } void cb_ve_editor(void *) { - select_form(selected_form = CUSTOM); - - const char *p = FSEL::select(_("Open data file"), "custom form\t*.k2s", - def_custom_filename.c_str()); - if (!p) return; - if (strlen(p) == 0) return; - if (strstr(p, ".k2s") == NULL) { - fl_alert2("Not a custom form\nUse Main Dialog for other forms"); + int event = Fl::event(); + if (event == FL_PASTE) { + def_custom_filename = Fl::event_text(); + + size_t n; + if ((n = def_custom_filename.find("file:///")) != string::npos) + def_custom_filename.erase(0, n + 7); + if ((def_custom_filename.find(":\\")) != string::npos || (def_custom_filename.find("/") == 0)) { + while ((n = def_custom_filename.find('\n')) != string::npos) + def_custom_filename.erase(n, 1); + while ((n = def_custom_filename.find('\r')) != string::npos) + def_custom_filename.erase(n, 1); + if (def_custom_filename.find("k2s") == std::string::npos) { + fl_alert2("Use expert dialog to edit built-in forms!"); + return; + } + clear_custom_form(); + read_data_file(def_custom_filename.c_str()); + using_custom_template = false; + update_custom = true; + handle_type = HANDLE_EDIT; + string url = "http://127.0.0.1:"; + url.append(sz_srvr_portnbr); + open_url(url.c_str()); + } else + def_custom_filename.clear(); return; } - clear_custom_form(); - read_data_file(p); - using_custom_template = false; - def_custom_filename = p; - update_custom = true; - handle_type = HANDLE_EDIT; - string url = "http://127.0.0.1:"; - url.append(sz_srvr_portnbr); - open_url(url.c_str()); + select_form(selected_form = CUSTOM); + + Fl_Native_File_Chooser native; + + native.filter("Custon msgs\t*.k2s\n"); + native.title(_("Open data file")); + native.preset_file(def_custom_filename.c_str()); + native.type(Fl_Native_File_Chooser::BROWSE_FILE); + native.options(Fl_Native_File_Chooser::PREVIEW); + native.directory(ICS_msg_dir.c_str()); + + switch ( native.show() ) { + case -1: // ERROR + LOG_ERROR("ERROR: %s\n", native.errmsg()); // Error fall through + case 1: // CANCEL + break; + default: + def_custom_filename = native.filename(); + if (def_custom_filename.find(".k2s") == std::string::npos) { + fl_alert2("Not a custom form\nUse Main Dialog for other forms"); + return; + } + clear_custom_form(); + read_data_file(def_custom_filename.c_str()); + using_custom_template = false; + update_custom = true; + handle_type = HANDLE_EDIT; + string url = "http://127.0.0.1:"; + url.append(sz_srvr_portnbr); + open_url(url.c_str()); + break; + } } void cb_ve_Exit(Fl_Widget *, void *d) @@ -2563,11 +2653,11 @@ ve_create->callback((Fl_Callback*)cb_ve_create); ve_create->tooltip(_("Create a new message")); - ve_editor = new Fl_Button(75, 65, 150, 25, _("Edit Message") ); + ve_editor = new Fl_Drop_Button(75, 65, 150, 25, _("Edit Message") ); ve_editor->callback((Fl_Callback*)cb_ve_editor); ve_editor->tooltip(_("Edit existing message")); - ve_viewer = new Fl_Button(75, 95, 150, 25, _("View Message") ); + ve_viewer = new Fl_Drop_Button(75, 95, 150, 25, _("View Message") ); ve_viewer->callback((Fl_Callback*)cb_ve_viewer); ve_viewer->tooltip(_("View existing message")); diff -Nru flmsg-4.0.14/src/include/compat.h flmsg-4.0.17/src/include/compat.h --- flmsg-4.0.14/src/include/compat.h 2019-05-25 01:38:29.000000000 +0000 +++ flmsg-4.0.17/src/include/compat.h 2020-04-25 17:34:59.000000000 +0000 @@ -31,6 +31,7 @@ #define _GNU_SOURCE 1 #define _BSD_SOURCE 1 + #include #include diff -Nru flmsg-4.0.14/src/include/drop_button.h flmsg-4.0.17/src/include/drop_button.h --- flmsg-4.0.14/src/include/drop_button.h 1970-01-01 00:00:00.000000000 +0000 +++ flmsg-4.0.17/src/include/drop_button.h 2020-04-29 19:37:59.000000000 +0000 @@ -0,0 +1,44 @@ +// ===================================================================== +// +// drop_button.cxx +// +// Author: David Freese, W1HKJ +// Copyright: 2020 +// +// This file is part of flmsg. +// +// This 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 3 of the License, or +// (at your option) any later version. +// +// This software 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. It is +// copyright under the GNU General Public License. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// ===================================================================== +// +// extends normal button to allow drop events +// --------------------------------------------------------------------- + +#ifndef FL_DROP_BUTTON_ +#define FL_DROP_BUTTON_ + +#include "config.h" + +#include +#include + +class Fl_Drop_Button : public Fl_Button +{ + int last_event; +public: + Fl_Drop_Button(int x, int y, int w, int h, const char* l = 0); + int handle(int event); +}; + +#endif // FL_DROP_BUTTON_ diff -Nru flmsg-4.0.14/src/include/Fl_Text_Buffer_mod.H flmsg-4.0.17/src/include/Fl_Text_Buffer_mod.H --- flmsg-4.0.14/src/include/Fl_Text_Buffer_mod.H 2019-05-25 01:38:29.000000000 +0000 +++ flmsg-4.0.17/src/include/Fl_Text_Buffer_mod.H 2020-04-05 13:09:00.000000000 +0000 @@ -20,8 +20,8 @@ #include -#if FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR < 3 +#if FLMSG_FLTK_API_MINOR < 3 # include "Fl_Text_Buffer_mod_1_1.H" -#elif FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR == 3 +#else # include "Fl_Text_Buffer_mod_1_3.H" #endif diff -Nru flmsg-4.0.14/src/include/Fl_Text_Display_mod.H flmsg-4.0.17/src/include/Fl_Text_Display_mod.H --- flmsg-4.0.14/src/include/Fl_Text_Display_mod.H 2019-05-25 01:38:29.000000000 +0000 +++ flmsg-4.0.17/src/include/Fl_Text_Display_mod.H 2020-04-05 13:08:36.000000000 +0000 @@ -20,8 +20,8 @@ #include -#if FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR < 3 +#if FLMSG_FLTK_API_MINOR < 3 # include "Fl_Text_Display_mod_1_1.H" -#elif FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR == 3 +#else # include "Fl_Text_Display_mod_1_3.H" #endif diff -Nru flmsg-4.0.14/src/include/Fl_Text_Editor_mod.H flmsg-4.0.17/src/include/Fl_Text_Editor_mod.H --- flmsg-4.0.14/src/include/Fl_Text_Editor_mod.H 2019-05-25 01:38:29.000000000 +0000 +++ flmsg-4.0.17/src/include/Fl_Text_Editor_mod.H 2020-04-05 13:07:08.000000000 +0000 @@ -20,8 +20,8 @@ #include -#if FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR < 3 +#if FLMSG_FLTK_API_MINOR < 3 # include "Fl_Text_Editor_mod_1_1.H" -#elif FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR == 3 +#else # include "Fl_Text_Editor_mod_1_3.H" #endif diff -Nru flmsg-4.0.14/src/include/util.h flmsg-4.0.17/src/include/util.h --- flmsg-4.0.14/src/include/util.h 2019-05-25 01:38:29.000000000 +0000 +++ flmsg-4.0.17/src/include/util.h 2020-04-29 19:37:59.000000000 +0000 @@ -189,8 +189,11 @@ # define PRIdSZ "Id" #endif +#ifdef __WIN32__ +# define PATH_SEP "\\" +#else # define PATH_SEP "/" - +#endif //====================================================================== diff -Nru flmsg-4.0.14/src/Makefile.am flmsg-4.0.17/src/Makefile.am --- flmsg-4.0.14/src/Makefile.am 2019-06-19 13:32:31.000000000 +0000 +++ flmsg-4.0.17/src/Makefile.am 2020-04-29 19:37:59.000000000 +0000 @@ -251,6 +251,7 @@ widgets/calendar.cxx \ widgets/combo.cxx \ widgets/date.cxx \ + widgets/drop_button.cxx \ widgets/fileselect.cxx \ widgets/flinput2.cxx \ widgets/flmisc.cxx \ @@ -301,6 +302,7 @@ include/date.h \ include/debug.h \ include/dirent-check.h \ + include/drop_button.h \ include/ext_string.h \ include/fileselect.h \ include/fl_lock.h \ diff -Nru flmsg-4.0.14/src/Makefile.in flmsg-4.0.17/src/Makefile.in --- flmsg-4.0.14/src/Makefile.in 2019-08-05 14:25:02.000000000 +0000 +++ flmsg-4.0.17/src/Makefile.in 2020-09-08 22:33:24.000000000 +0000 @@ -172,11 +172,11 @@ utils/socket.cxx utils/status.cxx utils/timeops.cxx \ utils/time_table.cxx utils/threads.cxx utils/util.cxx \ utils/wrap.cxx utils/xml_io.cxx widgets/calendar.cxx \ - widgets/combo.cxx widgets/date.cxx widgets/fileselect.cxx \ - widgets/flinput2.cxx widgets/flmisc.cxx widgets/flslider2.cxx \ - widgets/Fl_Text_Buffer_mod.cxx widgets/Fl_Text_Editor_mod.cxx \ - widgets/Fl_Text_Display_mod.cxx widgets/FTextView.cxx \ - widgets/icons.cxx widgets/pixmaps.cxx \ + widgets/combo.cxx widgets/date.cxx widgets/drop_button.cxx \ + widgets/fileselect.cxx widgets/flinput2.cxx widgets/flmisc.cxx \ + widgets/flslider2.cxx widgets/Fl_Text_Buffer_mod.cxx \ + widgets/Fl_Text_Editor_mod.cxx widgets/Fl_Text_Display_mod.cxx \ + widgets/FTextView.cxx widgets/icons.cxx widgets/pixmaps.cxx \ widgets/pixmaps_tango.cxx widgets/font_browser.cxx \ wx/hurricane.cxx wx/hurricane_tab.cxx \ wx/hurricane_template.cxx wx/severe_wx.cxx \ @@ -276,6 +276,7 @@ utils/flmsg-wrap.$(OBJEXT) utils/flmsg-xml_io.$(OBJEXT) \ widgets/flmsg-calendar.$(OBJEXT) widgets/flmsg-combo.$(OBJEXT) \ widgets/flmsg-date.$(OBJEXT) \ + widgets/flmsg-drop_button.$(OBJEXT) \ widgets/flmsg-fileselect.$(OBJEXT) \ widgets/flmsg-flinput2.$(OBJEXT) \ widgets/flmsg-flmisc.$(OBJEXT) \ @@ -594,11 +595,11 @@ utils/socket.cxx utils/status.cxx utils/timeops.cxx \ utils/time_table.cxx utils/threads.cxx utils/util.cxx \ utils/wrap.cxx utils/xml_io.cxx widgets/calendar.cxx \ - widgets/combo.cxx widgets/date.cxx widgets/fileselect.cxx \ - widgets/flinput2.cxx widgets/flmisc.cxx widgets/flslider2.cxx \ - widgets/Fl_Text_Buffer_mod.cxx widgets/Fl_Text_Editor_mod.cxx \ - widgets/Fl_Text_Display_mod.cxx widgets/FTextView.cxx \ - widgets/icons.cxx widgets/pixmaps.cxx \ + widgets/combo.cxx widgets/date.cxx widgets/drop_button.cxx \ + widgets/fileselect.cxx widgets/flinput2.cxx widgets/flmisc.cxx \ + widgets/flslider2.cxx widgets/Fl_Text_Buffer_mod.cxx \ + widgets/Fl_Text_Editor_mod.cxx widgets/Fl_Text_Display_mod.cxx \ + widgets/FTextView.cxx widgets/icons.cxx widgets/pixmaps.cxx \ widgets/pixmaps_tango.cxx widgets/font_browser.cxx \ wx/hurricane.cxx wx/hurricane_tab.cxx \ wx/hurricane_template.cxx wx/severe_wx.cxx \ @@ -647,19 +648,19 @@ include/base128.h include/base256.h include/calendar.h \ include/cap.h include/combo.h include/compat.h \ include/compat-mingw.h include/crc16.h include/date.h \ - include/debug.h include/dirent-check.h include/ext_string.h \ - include/fileselect.h include/fl_lock.h include/flmisc.h \ - include/flmsg_config.h include/flmsgrc.h include/flinput2.h \ - include/flslider2.h include/font_browser.h include/gettext.h \ - include/hx_msgs.h include/iaru.h include/icons.h \ - include/flmsg.h include/flmsg_dialog.h include/mongoose.h \ - include/socket.h include/templates.h include/mingw.h \ - include/parse_xml.h include/pixmaps.h include/stacktrace.h \ - include/status.h include/flmsg_strings.h include/threads.h \ - include/timeops.h include/time_table.h include/transfer.h \ - include/util.h include/wrap.h include/wx_strings.h \ - include/xml_io.h widgets/missing_strings.c \ - widgets/Fl_Text_Buffer_mod_1_1.cxx \ + include/debug.h include/dirent-check.h include/drop_button.h \ + include/ext_string.h include/fileselect.h include/fl_lock.h \ + include/flmisc.h include/flmsg_config.h include/flmsgrc.h \ + include/flinput2.h include/flslider2.h include/font_browser.h \ + include/gettext.h include/hx_msgs.h include/iaru.h \ + include/icons.h include/flmsg.h include/flmsg_dialog.h \ + include/mongoose.h include/socket.h include/templates.h \ + include/mingw.h include/parse_xml.h include/pixmaps.h \ + include/stacktrace.h include/status.h include/flmsg_strings.h \ + include/threads.h include/timeops.h include/time_table.h \ + include/transfer.h include/util.h include/wrap.h \ + include/wx_strings.h include/xml_io.h \ + widgets/missing_strings.c widgets/Fl_Text_Buffer_mod_1_1.cxx \ widgets/Fl_Text_Buffer_mod_1_3.cxx \ widgets/Fl_Text_Display_mod_1_1.cxx \ widgets/Fl_Text_Display_mod_1_3.cxx \ @@ -1140,6 +1141,8 @@ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flmsg-date.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) +widgets/flmsg-drop_button.$(OBJEXT): widgets/$(am__dirstamp) \ + widgets/$(DEPDIR)/$(am__dirstamp) widgets/flmsg-fileselect.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flmsg-flinput2.$(OBJEXT): widgets/$(am__dirstamp) \ @@ -1335,6 +1338,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flmsg-calendar.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flmsg-combo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flmsg-date.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flmsg-drop_button.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flmsg-fileselect.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flmsg-flinput2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flmsg-flmisc.Po@am__quote@ @@ -3104,6 +3108,20 @@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-date.obj `if test -f 'widgets/date.cxx'; then $(CYGPATH_W) 'widgets/date.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/date.cxx'; fi` +widgets/flmsg-drop_button.o: widgets/drop_button.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-drop_button.o -MD -MP -MF widgets/$(DEPDIR)/flmsg-drop_button.Tpo -c -o widgets/flmsg-drop_button.o `test -f 'widgets/drop_button.cxx' || echo '$(srcdir)/'`widgets/drop_button.cxx +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flmsg-drop_button.Tpo widgets/$(DEPDIR)/flmsg-drop_button.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/drop_button.cxx' object='widgets/flmsg-drop_button.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-drop_button.o `test -f 'widgets/drop_button.cxx' || echo '$(srcdir)/'`widgets/drop_button.cxx + +widgets/flmsg-drop_button.obj: widgets/drop_button.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-drop_button.obj -MD -MP -MF widgets/$(DEPDIR)/flmsg-drop_button.Tpo -c -o widgets/flmsg-drop_button.obj `if test -f 'widgets/drop_button.cxx'; then $(CYGPATH_W) 'widgets/drop_button.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/drop_button.cxx'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flmsg-drop_button.Tpo widgets/$(DEPDIR)/flmsg-drop_button.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/drop_button.cxx' object='widgets/flmsg-drop_button.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-drop_button.obj `if test -f 'widgets/drop_button.cxx'; then $(CYGPATH_W) 'widgets/drop_button.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/drop_button.cxx'; fi` + widgets/flmsg-fileselect.o: widgets/fileselect.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-fileselect.o -MD -MP -MF widgets/$(DEPDIR)/flmsg-fileselect.Tpo -c -o widgets/flmsg-fileselect.o `test -f 'widgets/fileselect.cxx' || echo '$(srcdir)/'`widgets/fileselect.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flmsg-fileselect.Tpo widgets/$(DEPDIR)/flmsg-fileselect.Po diff -Nru flmsg-4.0.14/src/mars/mars_tab.cxx flmsg-4.0.17/src/mars/mars_tab.cxx --- flmsg-4.0.14/src/mars/mars_tab.cxx 2019-05-25 01:38:29.000000000 +0000 +++ flmsg-4.0.17/src/mars/mars_tab.cxx 2020-06-25 14:23:55.000000000 +0000 @@ -179,27 +179,42 @@ static string str; str = notail(s); if (str.length() <= nchars) return str; - size_t ccount = 0; - size_t lastspace = -1; - size_t p = 0; - while ( p < str.length() ) { + size_t ccount = 0; // # chars on line + size_t lastspace = -1; // pointer to last space characer + size_t p = 0; // text pointer + + nchars--; + while ( p < str.length() - 1 ) { if (str[p] == '\n') { ccount = 0; if (indent) { - str.insert(lastspace+1, indent, ' '); + str.insert(lastspace + 1, indent, ' '); p += indent; ccount = indent; + lastspace = p; } - } else if (str[p] == ' ') lastspace = p; + } else if (str[p] == ' ') { + lastspace = p; + if (ccount > nchars) { + str.insert(lastspace + 1, indent, ' '); + p += indent; + ccount = indent; + lastspace = p; + } + } + else if (ccount > nchars) { + str.insert(p, "\n"); + p++; + if (indent) { + str.insert(p, indent, ' '); + p += indent; + ccount = indent; + } + lastspace = p - 1; + ccount = indent; + } p++; ccount++; - if (ccount > nchars - 1) { - str[lastspace] = '\n'; - if (indent) - str.insert(lastspace+1, indent, ' '); - p = lastspace+1; - ccount = 0; - } } return str; } diff -Nru flmsg-4.0.14/src/transfer/transfer.cxx flmsg-4.0.17/src/transfer/transfer.cxx --- flmsg-4.0.14/src/transfer/transfer.cxx 2019-05-25 01:38:29.000000000 +0000 +++ flmsg-4.0.17/src/transfer/transfer.cxx 2020-07-22 15:39:22.000000000 +0000 @@ -267,7 +267,10 @@ } fseek(dfile, 0, SEEK_END); size_t fsize = ftell(dfile); - if (fsize <= 0) return; + if (fsize <= 0) { + fclose (dfile); + return; + } fseek(dfile, 0, SEEK_SET); transfer_buffer.resize(fsize); size_t r = fread((void *)transfer_buffer.c_str(), 1, fsize, dfile); diff -Nru flmsg-4.0.14/src/utils/parse_xml.cxx flmsg-4.0.17/src/utils/parse_xml.cxx --- flmsg-4.0.14/src/utils/parse_xml.cxx 2019-05-25 01:38:30.000000000 +0000 +++ flmsg-4.0.17/src/utils/parse_xml.cxx 2020-07-22 15:42:18.000000000 +0000 @@ -577,7 +577,10 @@ fseek (xmlfile, 0, SEEK_SET); retval = fread (buff, filesize, 1, xmlfile); fclose (xmlfile); - if (retval != 1) return false; + if (retval != 1) { + delete[] buff; + return false; + } ics_pmode = HICS_TO; clear_ics_xml(); @@ -1157,7 +1160,10 @@ fseek (xmlfile, 0, SEEK_SET); retval = fread (buff, filesize, 1, xmlfile); fclose (xmlfile); - if (retval != 1) return false; + if (retval != 1) { + delete[] buff; + return false; + } rg_pmode = FILED; clear_rg_xml(); diff -Nru flmsg-4.0.14/src/utils/status.cxx flmsg-4.0.17/src/utils/status.cxx --- flmsg-4.0.14/src/utils/status.cxx 2019-08-01 13:00:44.000000000 +0000 +++ flmsg-4.0.17/src/utils/status.cxx 2020-07-22 15:42:51.000000000 +0000 @@ -90,6 +90,7 @@ false, // arq_shown; false, // UI_expert; false, // UI_default; + 0, // int arq_notify_timeout false // bool notify_receipt }; @@ -224,13 +225,15 @@ flmsgpref.get("myemail", defbuffer, ""); my_email = defbuffer; free(defbuffer); - if (flmsgpref.get("sernbr", defbuffer, "")) + if (flmsgpref.get("sernbr", defbuffer, "")) { sernbr = defbuffer; - free(defbuffer); + free(defbuffer); + } - if (flmsgpref.get("rgnbr", defbuffer, "")) + if (flmsgpref.get("rgnbr", defbuffer, "")) { rgnbr = defbuffer; - free(defbuffer); + free(defbuffer); + } if (flmsgpref.get("rri", i, rri)) rri = i; diff -Nru flmsg-4.0.14/src/utils/xml_io.cxx flmsg-4.0.17/src/utils/xml_io.cxx --- flmsg-4.0.14/src/utils/xml_io.cxx 2019-08-02 19:57:00.000000000 +0000 +++ flmsg-4.0.17/src/utils/xml_io.cxx 2020-05-01 23:41:30.000000000 +0000 @@ -78,7 +78,7 @@ string xml_rxbuffer; -#define XMLRPC_UPDATE_INTERVAL 50 +#define XMLRPC_UPDATE_INTERVAL 500 static pthread_mutex_t mutex_exec = PTHREAD_MUTEX_INITIALIZER; @@ -396,7 +396,7 @@ //std::cout << "version test: " << version << std::endl; if (!version.empty()) fldigi_online = true; } catch (...) { - LOG_ERROR("%s", xmlcall.c_str()); +// LOG_ERROR("%s", xmlcall.c_str()); throw; } } diff -Nru flmsg-4.0.14/src/widgets/drop_button.cxx flmsg-4.0.17/src/widgets/drop_button.cxx --- flmsg-4.0.14/src/widgets/drop_button.cxx 1970-01-01 00:00:00.000000000 +0000 +++ flmsg-4.0.17/src/widgets/drop_button.cxx 2020-04-29 19:37:59.000000000 +0000 @@ -0,0 +1,53 @@ +// ===================================================================== +// +// drop_button.cxx +// +// Author: David Freese, W1HKJ +// Copyright: 2020 +// +// This file is part of flmsg. +// +// This 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 3 of the License, or +// (at your option) any later version. +// +// This software 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. It is +// copyright under the GNU General Public License. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// ===================================================================== +// +// extends normal button to allow drop events +// --------------------------------------------------------------------- + +#include +#include +#include + +#include "config.h" + +#include "drop_button.h" + +Fl_Drop_Button::Fl_Drop_Button(int x, int y, int w, int h, const char* l) +: Fl_Button(x, y, w, h, l) +{ + last_event = -1; +} + +int Fl_Drop_Button::handle(int event) +{ + if (event == FL_DND_ENTER || event == FL_DND_DRAG || event == FL_DND_RELEASE) { + last_event = event; + return 1; + } + if (event == FL_PASTE) { + do_callback(); + return 1; + } + return Fl_Button::handle(event); +} diff -Nru flmsg-4.0.14/src/widgets/fileselect.cxx flmsg-4.0.17/src/widgets/fileselect.cxx --- flmsg-4.0.14/src/widgets/fileselect.cxx 2019-05-25 01:38:30.000000000 +0000 +++ flmsg-4.0.17/src/widgets/fileselect.cxx 2020-04-29 19:37:59.000000000 +0000 @@ -325,7 +325,7 @@ if (!stitle.empty()) native.title(stitle.c_str()); native.type(Fl_Native_File_Chooser::BROWSE_DIRECTORY); if (!sfilter.empty()) native.filter(sfilter.c_str()); - native.options(Fl_Native_File_Chooser::NO_OPTIONS); + native.options(Fl_Native_File_Chooser::NEW_FOLDER);//NO_OPTIONS); #if __WIN32__ dosfname(sdef); #endif diff -Nru flmsg-4.0.14/src/widgets/Fl_Text_Buffer_mod.cxx flmsg-4.0.17/src/widgets/Fl_Text_Buffer_mod.cxx --- flmsg-4.0.14/src/widgets/Fl_Text_Buffer_mod.cxx 2019-05-25 01:38:30.000000000 +0000 +++ flmsg-4.0.17/src/widgets/Fl_Text_Buffer_mod.cxx 2020-04-05 14:25:02.000000000 +0000 @@ -20,8 +20,8 @@ #include -#if FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR < 3 +#if FLMSG_FLTK_API_MINOR < 3 # include "Fl_Text_Buffer_mod_1_1.cxx" -#elif FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR == 3 +#else # include "Fl_Text_Buffer_mod_1_3.cxx" #endif diff -Nru flmsg-4.0.14/src/widgets/Fl_Text_Display_mod_1_3.cxx flmsg-4.0.17/src/widgets/Fl_Text_Display_mod_1_3.cxx --- flmsg-4.0.14/src/widgets/Fl_Text_Display_mod_1_3.cxx 2019-05-25 01:38:30.000000000 +0000 +++ flmsg-4.0.17/src/widgets/Fl_Text_Display_mod_1_3.cxx 2020-04-05 14:26:09.000000000 +0000 @@ -3369,11 +3369,6 @@ // draw the non-text, non-scrollbar areas. if (damage() & FL_DAMAGE_ALL) { - // printf("drawing all (box = %d)\n", box()); - if (Fl_Surface_Device::surface()->class_name() == Fl_Printer::class_id) { - // if to printer, draw the background - fl_rectf(text_area.x, text_area.y, text_area.w, text_area.h, color() ); - } // draw the box() int W = w(), H = h(); draw_box(box(), x(), y(), W, H, color()); diff -Nru flmsg-4.0.14/src/widgets/Fl_Text_Display_mod.cxx flmsg-4.0.17/src/widgets/Fl_Text_Display_mod.cxx --- flmsg-4.0.14/src/widgets/Fl_Text_Display_mod.cxx 2019-05-25 01:38:30.000000000 +0000 +++ flmsg-4.0.17/src/widgets/Fl_Text_Display_mod.cxx 2020-04-05 14:25:02.000000000 +0000 @@ -20,8 +20,8 @@ #include -#if FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR < 3 +#if FLMSG_FLTK_API_MINOR < 3 # include "Fl_Text_Display_mod_1_1.cxx" -#elif FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR == 3 +#else # include "Fl_Text_Display_mod_1_3.cxx" #endif diff -Nru flmsg-4.0.14/src/widgets/Fl_Text_Editor_mod.cxx flmsg-4.0.17/src/widgets/Fl_Text_Editor_mod.cxx --- flmsg-4.0.14/src/widgets/Fl_Text_Editor_mod.cxx 2019-05-25 01:38:30.000000000 +0000 +++ flmsg-4.0.17/src/widgets/Fl_Text_Editor_mod.cxx 2020-04-05 14:25:02.000000000 +0000 @@ -20,8 +20,8 @@ #include -#if FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR < 3 +#if FLMSG_FLTK_API_MINOR < 3 # include "Fl_Text_Editor_mod_1_1.cxx" -#elif FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR == 3 +#else # include "Fl_Text_Editor_mod_1_3.cxx" #endif