Skip to content

Commit 0a3707c

Browse files
author
Nate Morrison
committed
Fixed some indenting, fixed an implicit declaration of dw_printf()
1 parent bc07681 commit 0a3707c

10 files changed

+31
-25
lines changed

Diff for: src/direwolf.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1524,7 +1524,7 @@ static void usage (char **argv)
15241524
/* I don't know if win32 supports ANSI colour sequences. */
15251525
#else
15261526
// TODO: Could vary by platform and build options.
1527-
//dw_printf ("Complete documentation can be found in /usr/local/share/doc/direwolf\n");
1527+
dw_printf ("Complete documentation can be found in /usr/local/share/doc/direwolf\n");
15281528
//dw_printf ("\e[0m\e\n\e[0J\e"); /* This appears to break the last bit of colour, so it is commented out. */
15291529
#endif
15301530
dw_printf ("or online at https://github.com/wb2osz/direwolf/tree/master/doc\n");
@@ -1535,3 +1535,4 @@ static void usage (char **argv)
15351535

15361536

15371537
/* end direwolf.c */
1538+

Diff for: src/fx25_rec.c

+1
Original file line numberDiff line numberDiff line change
@@ -484,3 +484,4 @@ static int my_unstuff (int chan, int subchan, int slice, unsigned char * restric
484484
} // my_unstuff
485485

486486
// end fx25_rec.c
487+

Diff for: src/fx25_send.c

+1
Original file line numberDiff line numberDiff line change
@@ -335,3 +335,4 @@ static int stuff_it (unsigned char *in, int ilen, unsigned char *out, int osize)
335335
} // end stuff_it
336336

337337
// end fx25_send.c
338+

Diff for: src/gen_packets.c

+13-13
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ int main(int argc, char **argv)
252252
if (modem.achan[0].baud < MIN_BAUD || modem.achan[0].baud > MAX_BAUD) {
253253
text_color_set(DW_COLOR_ERROR);
254254
dw_printf ("Use a more reasonable bit rate in range of %d - %d.\n", MIN_BAUD, MAX_BAUD);
255-
dw_printf ("\e[0m\e\n\e[0J\e");
255+
dw_printf ("\e[0m\e\n\e[0J\e");
256256
exit (EXIT_FAILURE);
257257
}
258258
break;
@@ -273,7 +273,7 @@ int main(int argc, char **argv)
273273
if (modem.achan[0].baud != 100 && (modem.achan[0].baud < MIN_BAUD || modem.achan[0].baud > MAX_BAUD)) {
274274
text_color_set(DW_COLOR_ERROR);
275275
dw_printf ("Use a more reasonable bit rate in range of %d - %d.\n", MIN_BAUD, MAX_BAUD);
276-
dw_printf ("\e[0m\e\n\e[0J\e");
276+
dw_printf ("\e[0m\e\n\e[0J\e");
277277
exit (EXIT_FAILURE);
278278
}
279279

@@ -345,7 +345,7 @@ int main(int argc, char **argv)
345345
if (modem.achan[0].mark_freq < 300 || modem.achan[0].mark_freq > 3000) {
346346
text_color_set(DW_COLOR_ERROR);
347347
dw_printf ("Use a more reasonable value in range of 300 - 3000.\n");
348-
dw_printf ("\e[0m\e\n\e[0J\e");
348+
dw_printf ("\e[0m\e\n\e[0J\e");
349349
exit (EXIT_FAILURE);
350350
}
351351
break;
@@ -358,7 +358,7 @@ int main(int argc, char **argv)
358358
if (modem.achan[0].space_freq < 300 || modem.achan[0].space_freq > 3000) {
359359
text_color_set(DW_COLOR_ERROR);
360360
dw_printf ("Use a more reasonable value in range of 300 - 3000.\n");
361-
dw_printf ("\e[0m\e\n\e[0J\e");
361+
dw_printf ("\e[0m\e\n\e[0J\e");
362362
exit (EXIT_FAILURE);
363363
}
364364
break;
@@ -383,7 +383,7 @@ int main(int argc, char **argv)
383383
if (amplitude < 0 || amplitude > 200) {
384384
text_color_set(DW_COLOR_ERROR);
385385
dw_printf ("Amplitude must be in range of 0 to 200.\n");
386-
dw_printf ("\e[0m\e\n\e[0J\e");
386+
dw_printf ("\e[0m\e\n\e[0J\e");
387387
exit (EXIT_FAILURE);
388388
}
389389
break;
@@ -397,7 +397,7 @@ int main(int argc, char **argv)
397397
text_color_set(DW_COLOR_ERROR);
398398
dw_printf ("Use a more reasonable audio sample rate in range of %d - %d.\n",
399399
MIN_SAMPLES_PER_SEC, MAX_SAMPLES_PER_SEC);
400-
dw_printf ("\e[0m\e\n\e[0J\e");
400+
dw_printf ("\e[0m\e\n\e[0J\e");
401401
exit (EXIT_FAILURE);
402402
}
403403
break;
@@ -416,7 +416,7 @@ int main(int argc, char **argv)
416416
if (leading_zeros < 8 || leading_zeros > 12000) {
417417
text_color_set(DW_COLOR_ERROR);
418418
dw_printf ("Use a more reasonable value.\n");
419-
dw_printf ("\e[0m\e\n\e[0J\e");
419+
dw_printf ("\e[0m\e\n\e[0J\e");
420420
exit (EXIT_FAILURE);
421421
}
422422
break;
@@ -454,7 +454,7 @@ int main(int argc, char **argv)
454454
if (g_morse_wpm < 5 || g_morse_wpm > 50) {
455455
text_color_set(DW_COLOR_ERROR);
456456
dw_printf ("Morse code speed must be in range of 5 to 50 WPM.\n");
457-
dw_printf ("\e[0m\e\n\e[0J\e");
457+
dw_printf ("\e[0m\e\n\e[0J\e");
458458
exit (EXIT_FAILURE);
459459
}
460460
break;
@@ -512,7 +512,7 @@ int main(int argc, char **argv)
512512
text_color_set(DW_COLOR_ERROR);
513513
dw_printf ("ERROR: Either -j or -J must be specified when using 2400 bps QPSK.\n");
514514
usage (argv);
515-
dw_printf ("\e[0m\e\n\e[0J\e");
515+
dw_printf ("\e[0m\e\n\e[0J\e");
516516
exit (1);
517517
}
518518

@@ -524,7 +524,7 @@ int main(int argc, char **argv)
524524
text_color_set(DW_COLOR_ERROR);
525525
dw_printf ("ERROR: The -o output file option must be specified.\n");
526526
usage (argv);
527-
dw_printf ("\e[0m\e\n\e[0J\e");
527+
dw_printf ("\e[0m\e\n\e[0J\e");
528528
exit (1);
529529
}
530530

@@ -534,7 +534,7 @@ int main(int argc, char **argv)
534534
if (err < 0) {
535535
text_color_set(DW_COLOR_ERROR);
536536
dw_printf ("ERROR - Can't open output file.\n");
537-
dw_printf ("\e[0m\e\n\e[0J\e");
537+
dw_printf ("\e[0m\e\n\e[0J\e");
538538
exit (1);
539539
}
540540

@@ -582,7 +582,7 @@ int main(int argc, char **argv)
582582
if (input_fp == NULL) {
583583
text_color_set(DW_COLOR_ERROR);
584584
dw_printf ("Can't open %s for read.\n", argv[optind]);
585-
dw_printf ("\e[0m\e\n\e[0J\e");
585+
dw_printf ("\e[0m\e\n\e[0J\e");
586586
exit (EXIT_FAILURE);
587587
}
588588
text_color_set(DW_COLOR_INFO);
@@ -718,7 +718,7 @@ static void usage (char **argv)
718718
dw_printf ("\n");
719719
dw_printf (" Read message from stdin and put quarter volume sound into the file x.wav.\n");
720720

721-
dw_printf ("\e[0m\e\n\e[0J\e");
721+
dw_printf ("\e[0m\e\n\e[0J\e");
722722
exit (EXIT_FAILURE);
723723
}
724724

Diff for: src/kissutil.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -269,14 +269,14 @@ int main (int argc, char *argv[])
269269
if ( ! S_ISDIR(s.st_mode)) {
270270
text_color_set(DW_COLOR_ERROR);
271271
dw_printf ("Receive queue location, %s, is not a directory.\n", receive_output);
272-
dw_printf ("\e[0m\e\n\e[0J\e");
272+
dw_printf ("\e[0m\e\n\e[0J\e");
273273
exit (EXIT_FAILURE);
274274
}
275275
}
276276
else {
277277
text_color_set(DW_COLOR_ERROR);
278278
dw_printf ("Receive queue location, %s, does not exist.\n", receive_output);
279-
dw_printf ("\e[0m\e\n\e[0J\e");
279+
dw_printf ("\e[0m\e\n\e[0J\e");
280280
exit (EXIT_FAILURE);
281281
}
282282
}
@@ -366,7 +366,7 @@ int main (int argc, char *argv[])
366366
else {
367367
text_color_set(DW_COLOR_ERROR);
368368
dw_printf("Can't access transmit queue directory %s. Quitting.\n", transmit_from);
369-
dw_printf ("\e[0m\e\n\e[0J\e");
369+
dw_printf ("\e[0m\e\n\e[0J\e");
370370
exit (EXIT_FAILURE);
371371
}
372372
SLEEP_SEC (1);

Diff for: src/latlong.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -1032,12 +1032,12 @@ int main (int argc, char *argv[])
10321032
if (errors > 0) {
10331033
text_color_set (DW_COLOR_ERROR);
10341034
dw_printf ("\nLocation Coordinate Conversion Test - FAILED!\n");
1035-
dw_printf ("\e[0m\e\n\e[0J\e");
1035+
dw_printf ("\e[0m\e\n\e[0J\e");
10361036
exit (EXIT_FAILURE);
10371037
}
10381038
text_color_set (DW_COLOR_REC);
10391039
dw_printf ("\nLocation Coordinate Conversion Test - SUCCESS!\n");
1040-
dw_printf ("\e[0m\e\n\e[0J\e");
1040+
dw_printf ("\e[0m\e\n\e[0J\e");
10411041
exit (EXIT_SUCCESS);
10421042

10431043
}
@@ -1048,3 +1048,4 @@ int main (int argc, char *argv[])
10481048

10491049

10501050
/* end latlong.c */
1051+

Diff for: src/ll2utm.c

+1
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,4 @@ static void usage (void)
116116
dw_printf ("\e[0m\e\n\e[0J\e");
117117
exit (1);
118118
}
119+

Diff for: src/log2gpx.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ int main (int argc, char *argv[])
9494
}
9595
else {
9696
fprintf (stderr, "Can't open %s for read.\n", argv[n]);
97-
dw_printf ("\e[0m\e\n\e[0J\e");
97+
printf ("\e[0m\e\n\e[0J\e");
9898
exit (1);
9999
}
100100
}
@@ -103,7 +103,7 @@ int main (int argc, char *argv[])
103103

104104
if (num_things == 0) {
105105
fprintf (stderr, "Nothing to process.\n");
106-
dw_printf ("\e[0m\e\n\e[0J\e");
106+
printf ("\e[0m\e\n\e[0J\e");
107107
exit (1);
108108
}
109109

@@ -147,8 +147,8 @@ int main (int argc, char *argv[])
147147
* GPX file tail.
148148
*/
149149
printf ("</gpx>\n");
150+
printf ("\e[0m\e\n\e[0J\e");
150151

151-
dw_printf ("\e[0m\e\n\e[0J\e");
152152
exit (0);
153153
}
154154

Diff for: src/utm2ll.c

+1
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,4 @@ static void usage (void)
145145
dw_printf ("\e[0m\e\n\e[0J\e");
146146
exit (1);
147147
}
148+

Diff for: src/walk96.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ int main (int argc, char *argv[])
7676
if (tnc == MYFDERROR) {
7777
text_color_set (DW_COLOR_ERROR);
7878
dw_printf ("Can't open serial port to KISS TNC.\n");
79-
dw_printf ("\e[0m\e\n\e[0J\e");
79+
dw_printf ("\e[0m\e\n\e[0J\e");
8080
exit (EXIT_FAILURE); // defined in stdlib.h
8181
}
8282

@@ -106,7 +106,7 @@ int main (int argc, char *argv[])
106106
else if (fix < 0) {
107107
text_color_set (DW_COLOR_ERROR);
108108
dw_printf ("Can't communicate with GPS receiver.\n");
109-
dw_printf ("\e[0m\e\n\e[0J\e");
109+
dw_printf ("\e[0m\e\n\e[0J\e");
110110
exit (EXIT_FAILURE);
111111
}
112112
else {
@@ -180,7 +180,7 @@ static void walk96 (int fix, double lat, double lon, float knots, float course,
180180
if (pp == NULL) {
181181
text_color_set (DW_COLOR_ERROR);
182182
dw_printf ("Unexpected error in ax25_from_text. Quitting.\n");
183-
dw_printf ("\e[0m\e\n\e[0J\e");
183+
dw_printf ("\e[0m\e\n\e[0J\e");
184184
exit (EXIT_FAILURE); // defined in stdlib.h
185185
}
186186

0 commit comments

Comments
 (0)