From e3df56ff6ec24bd2623a335d2a2fa9b0097b6a76 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 8 Nov 2012 15:50:41 +0100 Subject: [PATCH] monitor: Make field printing a global helper --- monitor/display.h | 2 ++ monitor/l2cap.c | 3 +-- monitor/packet.c | 2 -- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/monitor/display.h b/monitor/display.h index 2740f7699..4c7b4181a 100644 --- a/monitor/display.h +++ b/monitor/display.h @@ -24,6 +24,8 @@ #include +#define print_field(fmt, args...) printf("%-8c" fmt "\n", ' ', ## args) + bool use_color(void); int num_columns(void); diff --git a/monitor/l2cap.c b/monitor/l2cap.c index 63f7f4816..0675e93f6 100644 --- a/monitor/l2cap.c +++ b/monitor/l2cap.c @@ -29,10 +29,9 @@ #include #include "packet.h" +#include "display.h" #include "l2cap.h" -#define print_field(fmt, args...) printf("%-8c" fmt "\n", ' ', ## args) - struct sig_opcode_data { uint8_t opcode; const char *str; diff --git a/monitor/packet.c b/monitor/packet.c index 3f8b22b6d..4cf246e23 100644 --- a/monitor/packet.c +++ b/monitor/packet.c @@ -238,8 +238,6 @@ static void print_packet(struct timeval *tv, uint16_t index, char ident, printf("%s\n", line); } -#define print_field(fmt, args...) printf("%-8c" fmt "\n", ' ', ## args) - static const struct { uint8_t error; const char *str;