mirror of
https://github.com/troglobit/libite.git
synced 2026-11-06 15:50:57 +00:00
conio.h: Convert printheader() to static inline function
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
018e607290
commit
1323a88e94
1 file changed
+7
-3
@@ -75,9 +75,13 @@
|
|||||||
#define textcolor(color) __set_gm(RESETATTR, color, 30)
|
#define textcolor(color) __set_gm(RESETATTR, color, 30)
|
||||||
#define textbackground(color) __set_gm(RESETATTR, color, 40)
|
#define textbackground(color) __set_gm(RESETATTR, color, 40)
|
||||||
|
|
||||||
#define printheader(fp, line, nl) \
|
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), "")
|
fprintf(fp ?: stderr,
|
||||||
|
"%s\033[7m%s%*s\033[0m\n",
|
||||||
|
nl ? "\n" : "",
|
||||||
|
line, SCREEN_WIDTH - (int)strlen(line), "");
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* CONIO_H_ */
|
#endif /* CONIO_H_ */
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user