From 1323a88e9453ec9ead3bb63bf5e00daf382272d4 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Fri, 7 Jul 2017 12:51:25 +0200 Subject: [PATCH] conio.h: Convert printheader() to static inline function Signed-off-by: Joachim Nilsson --- conio.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/conio.h b/conio.h index dce8af2..74908cb 100644 --- a/conio.h +++ b/conio.h @@ -75,9 +75,13 @@ #define textcolor(color) __set_gm(RESETATTR, color, 30) #define textbackground(color) __set_gm(RESETATTR, color, 40) -#define printheader(fp, line, nl) \ - fprintf(fp ?: stderr, "%s\033[7m%s%*s\033[0m\n", nl ? "\n" : "",\ - line, SCREEN_WIDTH - (int)strlen(line), "") +static inline void printheader(FILE *fp, const char *line, int nl) +{ + fprintf(fp ?: stderr, + "%s\033[7m%s%*s\033[0m\n", + nl ? "\n" : "", + line, SCREEN_WIDTH - (int)strlen(line), ""); +} #endif /* CONIO_H_ */