FreeCalypso > hg > freecalypso-tools
comparison rvinterf/lowlevel/format_fc.c @ 930:a38430e03e73
rvinterf/lowlevel/format_fc.c: get rid of static fmtbuf
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 23 May 2023 05:59:17 +0000 |
parents | 65953c172f24 |
children | 8fc3b72eb2c6 |
comparison
equal
deleted
inserted
replaced
929:ab771ce34fac | 930:a38430e03e73 |
---|---|
13 extern u_char rxpkt[]; | 13 extern u_char rxpkt[]; |
14 extern size_t rxpkt_len; | 14 extern size_t rxpkt_len; |
15 | 15 |
16 extern void output_cont(); | 16 extern void output_cont(); |
17 | 17 |
18 static char fmtbuf[MAX_PKT_FROM_TARGET*8]; /* size it generously */ | |
19 | |
20 void | 18 void |
21 print_ati_output() | 19 print_ati_output() |
22 { | 20 { |
21 char fmtbuf[MAX_PKT_FROM_TARGET*4+2]; | |
22 | |
23 strcpy(fmtbuf, "ATI: "); | 23 strcpy(fmtbuf, "ATI: "); |
24 safe_print_trace(rxpkt + 1, (int)rxpkt_len - 1, fmtbuf + 5); | 24 safe_print_trace(rxpkt + 1, (int)rxpkt_len - 1, fmtbuf + 5); |
25 output_line(fmtbuf); | 25 output_line(fmtbuf); |
26 } | 26 } |
27 | 27 |
28 void | 28 void |
29 print_fc_lld_msg() | 29 print_fc_lld_msg() |
30 { | 30 { |
31 char fmtbuf[MAX_PKT_FROM_TARGET*4+2]; | |
32 | |
31 strcpy(fmtbuf, "LLD: "); | 33 strcpy(fmtbuf, "LLD: "); |
32 safe_print_trace(rxpkt + 1, (int)rxpkt_len - 1, fmtbuf + 5); | 34 safe_print_trace(rxpkt + 1, (int)rxpkt_len - 1, fmtbuf + 5); |
33 output_line(fmtbuf); | 35 output_line(fmtbuf); |
34 } | 36 } |
35 | 37 |
41 } | 43 } |
42 | 44 |
43 void | 45 void |
44 report_extui_packet() | 46 report_extui_packet() |
45 { | 47 { |
48 char fmtbuf[80]; | |
49 | |
46 sprintf(fmtbuf, "LCD OUT: row %u col %u-%u", rxpkt[1], rxpkt[2], | 50 sprintf(fmtbuf, "LCD OUT: row %u col %u-%u", rxpkt[1], rxpkt[2], |
47 rxpkt[2] + (rxpkt_len - 3) / 2 - 1); | 51 rxpkt[2] + (rxpkt_len - 3) / 2 - 1); |
48 output_line(fmtbuf); | 52 output_line(fmtbuf); |
49 } | 53 } |