From d9030901ea4ba36422f7ec131d41b4cdce0a6ed2 Mon Sep 17 00:00:00 2001 From: Andrej Lajovic Date: Sat, 16 Nov 2013 09:17:27 -0600 Subject: [PATCH] CharsetDistiller * Default constructor parameters for CharsetDistiller and OutputEncoder --- src/dialogs/fl_digi.cxx | 8 ++++---- src/include/charsetdistiller.h | 2 +- src/include/outputencoder.h | 2 +- src/widgets/psk_browser.cxx | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/dialogs/fl_digi.cxx b/src/dialogs/fl_digi.cxx index a736689b..8eee72e8 100644 --- a/src/dialogs/fl_digi.cxx +++ b/src/dialogs/fl_digi.cxx @@ -395,10 +395,10 @@ Pixmap fldigi_icon_pixmap; #endif // for character set conversion -int rxtx_charset = 0; -static CharsetDistiller rx_chd(charset_list[rxtx_charset].tiniconv_id); -static CharsetDistiller echo_chd(charset_list[rxtx_charset].tiniconv_id); -static OutputEncoder tx_encoder(charset_list[rxtx_charset].tiniconv_id); +int rxtx_charset; +static CharsetDistiller rx_chd; +static CharsetDistiller echo_chd; +static OutputEncoder tx_encoder; Fl_Menu_Item *getMenuItem(const char *caption, Fl_Menu_Item* submenu = 0); void UI_select(); diff --git a/src/include/charsetdistiller.h b/src/include/charsetdistiller.h index 8ae80329..c20bbc14 100644 --- a/src/include/charsetdistiller.h +++ b/src/include/charsetdistiller.h @@ -29,7 +29,7 @@ class CharsetDistiller { public: - CharsetDistiller(const int charset_in); + CharsetDistiller(const int charset_in = TINICONV_CHARSET_UTF_8); int set_input_encoding(const int charset_in); void rx(const unsigned char c); void rx(const unsigned char *c); diff --git a/src/include/outputencoder.h b/src/include/outputencoder.h index 33f54a0b..6c2e96a9 100644 --- a/src/include/outputencoder.h +++ b/src/include/outputencoder.h @@ -29,7 +29,7 @@ class OutputEncoder { public: - OutputEncoder(const int charset_out, unsigned int buffer_size = 32); + OutputEncoder(const int charset_out = TINICONV_CHARSET_UTF_8, unsigned int buffer_size = 32); ~OutputEncoder(void); void set_output_encoding(const int charset_out); void push(std::string s); diff --git a/src/widgets/psk_browser.cxx b/src/widgets/psk_browser.cxx index dab4a4fc..c2af8a5e 100644 --- a/src/widgets/psk_browser.cxx +++ b/src/widgets/psk_browser.cxx @@ -81,7 +81,7 @@ pskBrowser::pskBrowser(int x, int y, int w, int h, const char *l) bline = freqformat(i); if ( i < progdefaults.VIEWERchannels) add(bline.c_str()); linechars[i] = 0; - new(&cdistiller[i]) CharsetDistiller(rxtx_charset); + new(&cdistiller[i]) CharsetDistiller; } nchars = (w - cols[0] - (sbarwidth + 2*BWSR_BORDER)) / cwidth; nchars = nchars < 1 ? 1 : nchars;