From 5d92a249a6628e471c170c4c53aa40dea3fb3832 Mon Sep 17 00:00:00 2001 From: Nate Morrison Date: Tue, 22 Mar 2022 02:09:16 -0700 Subject: [PATCH] Fixed indentation --- src/atest.c | 14 +++++++------- src/audio.c | 2 +- src/audio_win.c | 2 +- src/direwolf.c | 9 ++++----- src/direwolf.h | 2 +- src/fx25_rec.c | 2 +- src/fx25_send.c | 1 - src/gen_packets.c | 6 +++--- src/latlong.c | 1 - src/ll2utm.c | 1 - src/log2gpx.c | 2 +- src/utm2ll.c | 1 - 12 files changed, 19 insertions(+), 24 deletions(-) diff --git a/src/atest.c b/src/atest.c index 8463727..3761fa2 100644 --- a/src/atest.c +++ b/src/atest.c @@ -604,21 +604,21 @@ int main (int argc, char *argv[]) if (format.wformattag != 1) { text_color_set(DW_COLOR_ERROR); dw_printf ("Sorry, I only understand audio format 1 (PCM). This file has %d.\n", format.wformattag); - dw_printf ("\e[0m\e\n\e[0J\e"); + dw_printf ("\e[0m\e\n\e[0J\e"); exit (EXIT_FAILURE); } if (format.nchannels != 1 && format.nchannels != 2) { text_color_set(DW_COLOR_ERROR); dw_printf ("Sorry, I only understand 1 or 2 channels. This file has %d.\n", format.nchannels); - dw_printf ("\e[0m\e\n\e[0J\e"); + dw_printf ("\e[0m\e\n\e[0J\e"); exit (EXIT_FAILURE); } if (format.wbitspersample != 8 && format.wbitspersample != 16) { text_color_set(DW_COLOR_ERROR); dw_printf ("Sorry, I only understand 8 or 16 bits per sample. This file has %d.\n", format.wbitspersample); - dw_printf ("\e[0m\e\n\e[0J\e"); + dw_printf ("\e[0m\e\n\e[0J\e"); exit (EXIT_FAILURE); } @@ -721,17 +721,17 @@ int main (int argc, char *argv[]) if (error_if_less_than != -1 && packets_decoded_total < error_if_less_than) { text_color_set(DW_COLOR_ERROR); dw_printf ("\n * * * TEST FAILED: number decoded is less than %d * * * \n", error_if_less_than); - dw_printf ("\e[0m\e\n\e[0J\e"); + dw_printf ("\e[0m\e\n\e[0J\e"); exit (EXIT_FAILURE); } if (error_if_greater_than != -1 && packets_decoded_total > error_if_greater_than) { text_color_set(DW_COLOR_ERROR); dw_printf ("\n * * * TEST FAILED: number decoded is greater than %d * * * \n", error_if_greater_than); - dw_printf ("\e[0m\e\n\e[0J\e"); + dw_printf ("\e[0m\e\n\e[0J\e"); exit (EXIT_FAILURE); } - dw_printf ("\e[0m\e\n\e[0J\e"); + dw_printf ("\e[0m\e\n\e[0J\e"); exit (EXIT_SUCCESS); } @@ -1023,7 +1023,7 @@ static void usage (void) { dw_printf (" Try different combinations of options to compare decoding\n"); dw_printf (" performance.\n"); - dw_printf ("\e[0m\e\n\e[0J\e"); + dw_printf ("\e[0m\e\n\e[0J\e"); exit (1); } diff --git a/src/audio.c b/src/audio.c index aba8193..7b838c3 100644 --- a/src/audio.c +++ b/src/audio.c @@ -1056,7 +1056,7 @@ int audio_get (int a) if (res <= 0) { text_color_set(DW_COLOR_INFO); dw_printf ("\nEnd of file on stdin. Exiting.\n"); - dw_printf ("\e[0m\e\n\e[0J\e"); + dw_printf ("\e[0m\e\n\e[0J\e"); exit (0); } diff --git a/src/audio_win.c b/src/audio_win.c index 47d3379..c84ab46 100644 --- a/src/audio_win.c +++ b/src/audio_win.c @@ -890,7 +890,7 @@ int audio_get (int a) if (res <= 0) { text_color_set(DW_COLOR_INFO); dw_printf ("\nEnd of file on stdin. Exiting.\n"); - dw_printf ("\e[0m\e\n\e[0J\e"); + dw_printf ("\e[0m\e\n\e[0J\e"); exit (0); } diff --git a/src/direwolf.c b/src/direwolf.c index 17982ef..a9cca5a 100644 --- a/src/direwolf.c +++ b/src/direwolf.c @@ -444,7 +444,7 @@ int main (int argc, char *argv[]) if (B_opt < MIN_BAUD || B_opt > MAX_BAUD) { text_color_set(DW_COLOR_ERROR); dw_printf ("Use a more reasonable data baud rate in range of %d - %d.\n", MIN_BAUD, MAX_BAUD); - dw_printf ("\e[0m\e\n\e[0J\e"); + dw_printf ("\e[0m\e\n\e[0J\e"); exit (EXIT_FAILURE); } break; @@ -476,7 +476,7 @@ int main (int argc, char *argv[]) if (D_opt < 1 || D_opt > 8) { text_color_set(DW_COLOR_ERROR); dw_printf ("Crazy value for -D. \n"); - dw_printf ("\e[0m\e\n\e[0J\e"); + dw_printf ("\e[0m\e\n\e[0J\e"); exit (EXIT_FAILURE); } break; @@ -487,7 +487,7 @@ int main (int argc, char *argv[]) if (U_opt < 1 || U_opt > 4) { text_color_set(DW_COLOR_ERROR); dw_printf ("Crazy value for -U. \n"); - dw_printf ("\e[0m\e\n\e[0J\e"); + dw_printf ("\e[0m\e\n\e[0J\e"); exit (EXIT_FAILURE); } break; @@ -1443,7 +1443,6 @@ static void cleanup_linux (int x) ptt_term (); dwgps_term (); SLEEP_SEC(1); - dw_printf ("\e[0m\e\n\e[0J\e"); exit(0); } @@ -1522,10 +1521,10 @@ static void usage (char **argv) #if __WIN32__ dw_printf ("Complete documentation can be found in the 'doc' folder\n"); /* I don't know if win32 supports ANSI colour sequences. */ + dw_printf ("\e[0m\e\n\e[0J\e"); #else // TODO: Could vary by platform and build options. dw_printf ("Complete documentation can be found in /usr/local/share/doc/direwolf\n"); - //dw_printf ("\e[0m\e\n\e[0J\e"); /* This appears to break the last bit of colour, so it is commented out. */ #endif dw_printf ("or online at https://github.com/wb2osz/direwolf/tree/master/doc\n"); dw_printf ("\e[0m\e\n\e[0J\e"); diff --git a/src/direwolf.h b/src/direwolf.h index f15e49d..efc329b 100644 --- a/src/direwolf.h +++ b/src/direwolf.h @@ -9,7 +9,6 @@ #endif - #ifndef DIREWOLF_H #define DIREWOLF_H 1 @@ -317,4 +316,5 @@ size_t strlcat_debug(char *__restrict__ dst, const char *__restrict__ src, size_ #endif /* BSD or Apple */ + #endif /* ifndef DIREWOLF_H */ diff --git a/src/fx25_rec.c b/src/fx25_rec.c index ba6ebc6..3695a88 100644 --- a/src/fx25_rec.c +++ b/src/fx25_rec.c @@ -483,5 +483,5 @@ static int my_unstuff (int chan, int subchan, int slice, unsigned char * restric } // my_unstuff -// end fx25_rec.c +// end fx25_rec.c diff --git a/src/fx25_send.c b/src/fx25_send.c index cd9f51b..0083f95 100644 --- a/src/fx25_send.c +++ b/src/fx25_send.c @@ -335,4 +335,3 @@ static int stuff_it (unsigned char *in, int ilen, unsigned char *out, int osize) } // end stuff_it // end fx25_send.c - diff --git a/src/gen_packets.c b/src/gen_packets.c index 62f628d..b5037f6 100644 --- a/src/gen_packets.c +++ b/src/gen_packets.c @@ -252,7 +252,7 @@ int main(int argc, char **argv) if (modem.achan[0].baud < MIN_BAUD || modem.achan[0].baud > MAX_BAUD) { text_color_set(DW_COLOR_ERROR); dw_printf ("Use a more reasonable bit rate in range of %d - %d.\n", MIN_BAUD, MAX_BAUD); - dw_printf ("\e[0m\e\n\e[0J\e"); + dw_printf ("\e[0m\e\n\e[0J\e"); exit (EXIT_FAILURE); } break; @@ -273,7 +273,7 @@ int main(int argc, char **argv) if (modem.achan[0].baud != 100 && (modem.achan[0].baud < MIN_BAUD || modem.achan[0].baud > MAX_BAUD)) { text_color_set(DW_COLOR_ERROR); dw_printf ("Use a more reasonable bit rate in range of %d - %d.\n", MIN_BAUD, MAX_BAUD); - dw_printf ("\e[0m\e\n\e[0J\e"); + dw_printf ("\e[0m\e\n\e[0J\e"); exit (EXIT_FAILURE); } @@ -581,7 +581,7 @@ int main(int argc, char **argv) input_fp = fopen(argv[optind], "r"); if (input_fp == NULL) { text_color_set(DW_COLOR_ERROR); - dw_printf ("Can't open %s for read.\n", argv[optind]); + dw_printf ("Can't open %s for read.\n", argv[optind]); dw_printf ("\e[0m\e\n\e[0J\e"); exit (EXIT_FAILURE); } diff --git a/src/latlong.c b/src/latlong.c index e8ec8ce..c13e769 100644 --- a/src/latlong.c +++ b/src/latlong.c @@ -1048,4 +1048,3 @@ int main (int argc, char *argv[]) /* end latlong.c */ - diff --git a/src/ll2utm.c b/src/ll2utm.c index 722528e..2f3a667 100644 --- a/src/ll2utm.c +++ b/src/ll2utm.c @@ -116,4 +116,3 @@ static void usage (void) dw_printf ("\e[0m\e\n\e[0J\e"); exit (1); } - diff --git a/src/log2gpx.c b/src/log2gpx.c index 4e2c68a..c1dd1e1 100644 --- a/src/log2gpx.c +++ b/src/log2gpx.c @@ -94,7 +94,7 @@ int main (int argc, char *argv[]) } else { fprintf (stderr, "Can't open %s for read.\n", argv[n]); - printf ("\e[0m\e\n\e[0J\e"); + printf ("\e[0m\e\n\e[0J\e"); exit (1); } } diff --git a/src/utm2ll.c b/src/utm2ll.c index eb4bc63..5f4ec74 100644 --- a/src/utm2ll.c +++ b/src/utm2ll.c @@ -145,4 +145,3 @@ static void usage (void) dw_printf ("\e[0m\e\n\e[0J\e"); exit (1); } -