mirror of https://github.com/wb2osz/direwolf.git
Fixed indentation
This commit is contained in:
parent
0a3707cb5b
commit
5d92a249a6
14
src/atest.c
14
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -1048,4 +1048,3 @@ int main (int argc, char *argv[])
|
|||
|
||||
|
||||
/* end latlong.c */
|
||||
|
||||
|
|
|
@ -116,4 +116,3 @@ static void usage (void)
|
|||
dw_printf ("\e[0m\e\n\e[0J\e");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -145,4 +145,3 @@ static void usage (void)
|
|||
dw_printf ("\e[0m\e\n\e[0J\e");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue