summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/spkmodem_recv/spkmodem-recv.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/util/spkmodem_recv/spkmodem-recv.c b/util/spkmodem_recv/spkmodem-recv.c
index eb372fda..82ea5a63 100644
--- a/util/spkmodem_recv/spkmodem-recv.c
+++ b/util/spkmodem_recv/spkmodem-recv.c
@@ -30,6 +30,7 @@ void fetch_sample(void);
void read_frame(int ringpos);
int set_ascii_bit(void);
void print_char(void);
+void print_stats(void);
int
main(int argc, char *argv[])
@@ -101,13 +102,8 @@ read_frame(int ringpos)
int
set_ascii_bit(void)
{
- if (debug) {
- long stdin_pos = 0;
- if ((stdin_pos = ftell(stdin)) == -1)
- err(ERR(), NULL);
- printf ("%d %d %d @%ld\n", freq_data, freq_separator,
- FREQ_DATA_THRESHOLD, stdin_pos - sizeof(frame));
- }
+ if (debug)
+ print_stats();
if (freq_data < FREQ_DATA_THRESHOLD)
ascii |= (1 << ascii_bit);
return ascii_bit;
@@ -123,3 +119,13 @@ print_char(void)
ascii_bit = 7;
ascii = 0;
}
+
+void
+print_stats(void)
+{
+ long stdin_pos = 0;
+ if ((stdin_pos = ftell(stdin)) == -1)
+ err(ERR(), NULL);
+ printf ("%d %d %d @%ld\n", freq_data, freq_separator,
+ FREQ_DATA_THRESHOLD, stdin_pos - sizeof(frame));
+}