From 3546526177689cac08ff264dc34afc6a6c5279da Mon Sep 17 00:00:00 2001 From: Ruslan Kuchumov Date: Tue, 15 Jul 2014 19:22:02 +0000 Subject: [PATCH] teletext support --- src/networking.c | 4 ++-- src/telxcc.c | 27 +++++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/networking.c b/src/networking.c index 8471cba2..e3050e01 100644 --- a/src/networking.c +++ b/src/networking.c @@ -422,8 +422,8 @@ void pr_command(char c) case OK: fprintf(stderr, "OK"); break; - case UNKNOWN_COMMAND: - fprintf(stderr, "UNKNOWN_COMMAND"); + case WRONG_PASSWORD: + fprintf(stderr, "WRONG_PASSWORD"); break; case UNKNOWN_COMMAND: fprintf(stderr, "UNKNOWN_COMMAND"); diff --git a/src/telxcc.c b/src/telxcc.c index 31efad9f..dede3493 100644 --- a/src/telxcc.c +++ b/src/telxcc.c @@ -364,21 +364,44 @@ void telxcc_dump_prev_page (void) if (ccx_options.transcript_settings.showStartTime){ millis_to_date(prev_show_timestamp, c_temp1); // Note: Delay not added here because it was already accounted for fdprintf(wbout1.fh, "%s|", c_temp1); + + if (ccx_options.send_to_srv) + net_append_cc("%s|", c_temp1); } if (ccx_options.transcript_settings.showEndTime) { millis_to_date (prev_hide_timestamp, c_temp2); - fdprintf(wbout1.fh,"%s|",c_temp2); + fdprintf(wbout1.fh,"%s|",c_temp2); + + if (ccx_options.send_to_srv) + net_append_cc("%s|",c_temp2); } if (ccx_options.transcript_settings.showMode){ fdprintf(wbout1.fh, "TLT|"); + + if (ccx_options.send_to_srv) + net_append_cc("TLT|"); } if (ccx_options.transcript_settings.showCC){ fdprintf(wbout1.fh, "%.3u|", bcd_page_to_int(tlt_config.page)); + + if (ccx_options.send_to_srv) + net_append_cc("%.3u|", bcd_page_to_int(tlt_config.page)); } - if (wbout1.fh!=-1) fdprintf(wbout1.fh, "%s",page_buffer_prev); + fdprintf(wbout1.fh, "%s",page_buffer_prev); + + if (ccx_options.send_to_srv) + net_append_cc("%s",page_buffer_prev); + fdprintf(wbout1.fh,"%s",encoded_crlf); + + if (ccx_options.send_to_srv) + { + net_append_cc("%s",encoded_crlf); + net_send_cc(); + } + if (page_buffer_prev) free (page_buffer_prev); if (ucs2_buffer_prev) free (ucs2_buffer_prev); // Switch "dump" buffers