util/spkmodem_recv: Remove space in function calls

Signed-off-by: Leah Rowe <leah@libreboot.org>
fsdg20230625
Leah Rowe 2023-05-16 08:30:24 +01:00
parent abc5cfd38c
commit 5b6f5cb06b
1 changed files with 13 additions and 13 deletions

View File

@ -26,10 +26,10 @@ static int pos, f1, f2;
static int amplitude = 0; static int amplitude = 0;
static int lp = 0; static int lp = 0;
static void read_sample (void); static void read_sample(void);
int int
main (int argc, char *argv[]) main(int argc, char *argv[])
{ {
int bitn = 7; int bitn = 7;
char c = 0; char c = 0;
@ -38,7 +38,7 @@ main (int argc, char *argv[])
(void)argc; (void)argv; (void)argc; (void)argv;
while (!feof (stdin)) { while (!feof(stdin)) {
if (lp > 3 * SAMPLES_PER_FRAME) { if (lp > 3 * SAMPLES_PER_FRAME) {
bitn = 7; bitn = 7;
c = 0; c = 0;
@ -46,25 +46,25 @@ main (int argc, char *argv[])
llp++; llp++;
} }
if (llp == FLUSH_TIMEOUT) if (llp == FLUSH_TIMEOUT)
fflush (stdout); fflush(stdout);
if (f2 <= FREQ_SEP_MIN || f2 >= FREQ_SEP_MAX if (f2 <= FREQ_SEP_MIN || f2 >= FREQ_SEP_MAX
|| f1 <= FREQ_DATA_MIN || f1 >= FREQ_DATA_MAX) { || f1 <= FREQ_DATA_MIN || f1 >= FREQ_DATA_MAX) {
read_sample (); read_sample();
continue; continue;
} }
#if DEBUG #if DEBUG
printf ("%d %d %d @%d\n", f1, f2, FREQ_DATA_THRESHOLD, printf ("%d %d %d @%d\n", f1, f2, FREQ_DATA_THRESHOLD,
ftell (stdin) - sizeof (frame)); ftell(stdin) - sizeof(frame));
#endif #endif
if (f1 < FREQ_DATA_THRESHOLD) if (f1 < FREQ_DATA_THRESHOLD)
c |= (1 << bitn); c |= (1 << bitn);
bitn--; bitn--;
if (bitn < 0) { if (bitn < 0) {
#if DEBUG #if DEBUG
printf ("<%c, %x>", c, c); printf("<%c, %x>", c, c);
#else #else
printf ("%c", c); printf("%c", c);
#endif #endif
bitn = 7; bitn = 7;
c = 0; c = 0;
@ -72,20 +72,20 @@ main (int argc, char *argv[])
lp = 0; lp = 0;
llp = 0; llp = 0;
for (i = 0; i < SAMPLES_PER_FRAME; i++) for (i = 0; i < SAMPLES_PER_FRAME; i++)
read_sample (); read_sample();
} }
return 0; return 0;
} }
static void static void
read_sample (void) read_sample(void)
{ {
amplitude -= abs (frame[ringpos]); amplitude -= abs(frame[ringpos]);
f1 -= pulse[ringpos]; f1 -= pulse[ringpos];
f1 += pulse[(ringpos + SAMPLES_PER_FRAME) % (2 * SAMPLES_PER_FRAME)]; f1 += pulse[(ringpos + SAMPLES_PER_FRAME) % (2 * SAMPLES_PER_FRAME)];
f2 -= pulse[(ringpos + SAMPLES_PER_FRAME) % (2 * SAMPLES_PER_FRAME)]; f2 -= pulse[(ringpos + SAMPLES_PER_FRAME) % (2 * SAMPLES_PER_FRAME)];
fread (frame + ringpos, 1, sizeof (frame[0]), stdin); fread(frame + ringpos, 1, sizeof(frame[0]), stdin);
amplitude += abs (frame[ringpos]); amplitude += abs(frame[ringpos]);
if (abs(frame[ringpos]) > THRESHOLD) { /* rising/falling edge(pulse) */ if (abs(frame[ringpos]) > THRESHOLD) { /* rising/falling edge(pulse) */
pulse[ringpos] = 1; pulse[ringpos] = 1;