summaryrefslogtreecommitdiff
path: root/ham/fldigi/patches
diff options
context:
space:
mode:
authorjoerg <joerg>2015-11-03 19:03:27 +0000
committerjoerg <joerg>2015-11-03 19:03:27 +0000
commit01a4d24f0bd0d77bdea6f270560a4f4b89eda98e (patch)
tree1343018098b74e0fde2c27226cbb4a724cf285de /ham/fldigi/patches
parentca082aca3023cfa3ec33dd4784da582737abb4da (diff)
downloadpkgsrc-01a4d24f0bd0d77bdea6f270560a4f4b89eda98e.tar.gz
More std::complex abuse. Deal with C++11's std::next.
Diffstat (limited to 'ham/fldigi/patches')
-rw-r--r--ham/fldigi/patches/patch-src_fsq_fsq.cxx39
-rw-r--r--ham/fldigi/patches/patch-src_ifkp_ifkp.cxx21
2 files changed, 56 insertions, 4 deletions
diff --git a/ham/fldigi/patches/patch-src_fsq_fsq.cxx b/ham/fldigi/patches/patch-src_fsq_fsq.cxx
index e49179b2d6b..54c40a252ce 100644
--- a/ham/fldigi/patches/patch-src_fsq_fsq.cxx
+++ b/ham/fldigi/patches/patch-src_fsq_fsq.cxx
@@ -1,11 +1,11 @@
-$NetBSD: patch-src_fsq_fsq.cxx,v 1.2 2015/10/11 03:59:56 mef Exp $
+$NetBSD: patch-src_fsq_fsq.cxx,v 1.3 2015/11/03 19:03:27 joerg Exp $
-date: 2015-08-11 04:26:43 +0900; author: joerg; state: Exp; commitid: PzvH77JwGWkn2Lwy;
+Resolve conflict between std::next and the local variable of the same name.
std::complex::imag() and std::complex::real() are not lvalues.
---- src/fsq/fsq.cxx.orig 2015-07-21 14:54:32.000000000 +0000
+--- src/fsq/fsq.cxx.orig 2015-09-28 18:24:41.000000000 +0000
+++ src/fsq/fsq.cxx
-@@ -1197,9 +1197,12 @@ int fsq::rx_process(const double *buf, i
+@@ -1193,9 +1193,12 @@ int fsq::rx_process(const double *buf, i
&rx_stream[SHIFT_SIZE], // from
BLOCK_SIZE*sizeof(*rx_stream)); // # bytes
memset(fft_data, 0, sizeof(fft_data));
@@ -21,3 +21,34 @@ std::complex::imag() and std::complex::real() are not lvalues.
fft->ComplexFFT(fft_data);
process_tones();
}
+@@ -1423,7 +1426,7 @@ static string tx_text_queue = "";
+
+ static vector<string> commands;
+ #define NUMCOMMANDS 10
+-static size_t next = 0;
++static size_t nextidx = 0;
+
+ double fsq_xmtdelay() // in seconds
+ {
+@@ -1440,9 +1443,9 @@ double fsq_xmtdelay() // in seconds
+ void fsq_repeat_last_command()
+ {
+ fsq_tx_text->clear();
+- fsq_tx_text->addstr(sz2utf8(commands[next].c_str()));
+- next++;
+- if (next == commands.size()) next = 0;
++ fsq_tx_text->addstr(sz2utf8(commands[nextidx].c_str()));
++ nextidx++;
++ if (nextidx == commands.size()) nextidx = 0;
+ }
+
+ int get_fsq_tx_char(void)
+@@ -1484,7 +1487,7 @@ void try_transmit(void *)
+ if (active_modem != fsq_modem) return;
+
+ if (!active_modem->fsq_squelch_open() && trx_state == STATE_RX) {
+- next = 0;
++ nextidx = 0;
+ fsq_que_clear();
+ //LOG_WARN("%s", "start_tx()");
+ start_tx();
diff --git a/ham/fldigi/patches/patch-src_ifkp_ifkp.cxx b/ham/fldigi/patches/patch-src_ifkp_ifkp.cxx
new file mode 100644
index 00000000000..87693bd8f1f
--- /dev/null
+++ b/ham/fldigi/patches/patch-src_ifkp_ifkp.cxx
@@ -0,0 +1,21 @@
+$NetBSD: patch-src_ifkp_ifkp.cxx,v 1.1 2015/11/03 19:03:27 joerg Exp $
+
+std::complex::imag() and std::complex::real() are not lvalues.
+
+--- src/ifkp/ifkp.cxx.orig 2015-10-25 14:22:27.000000000 +0000
++++ src/ifkp/ifkp.cxx
+@@ -580,9 +580,11 @@ int ifkp::rx_process(const double *buf,
+ &rx_stream[IFKP_SHIFT_SIZE], // from
+ IFKP_BLOCK_SIZE*sizeof(*rx_stream)); // # bytes
+ memset(fft_data, 0, sizeof(fft_data));
+- for (int i = 0; i < IFKP_BLOCK_SIZE; i++)
+- fft_data[i].real() = fft_data[i].imag() =
+- rx_stream[i] * a_blackman[i];
++ for (int i = 0; i < IFKP_BLOCK_SIZE; i++) {
++ double r = rx_stream[i] * a_blackman[i];
++ fft_data[i].real(r);
++ fft_data[i].imag(r);
++ }
+ fft->ComplexFFT(fft_data);
+ process_tones();
+ }