mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
75 lines
1.0 KiB
C
75 lines
1.0 KiB
C
/** Terminfo interfaces
|
|
* @file */
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
#include "config.h"
|
|
#endif
|
|
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <stdio.h>
|
|
#include <sys/types.h>
|
|
#ifdef HAVE_UNISTD_H
|
|
#include <unistd.h>
|
|
#endif
|
|
|
|
#ifdef HAVE_TERM_H
|
|
#include <term.h>
|
|
#endif
|
|
|
|
#include "elinks.h"
|
|
|
|
int
|
|
terminfo_setupterm(char *term, int fildes)
|
|
{
|
|
return setupterm(term, fildes, NULL);
|
|
}
|
|
|
|
char *
|
|
terminfo_clear_screen(void)
|
|
{
|
|
return tiparm(clear_screen);
|
|
}
|
|
|
|
char *
|
|
terminfo_set_bold(int arg)
|
|
{
|
|
return tiparm(arg ? enter_bold_mode : exit_attribute_mode);
|
|
}
|
|
|
|
char *
|
|
terminfo_set_italics(int arg)
|
|
{
|
|
return tiparm(arg ? enter_italics_mode : exit_italics_mode);
|
|
}
|
|
|
|
char *
|
|
terminfo_set_underline(int arg)
|
|
{
|
|
return tiparm(arg ? enter_underline_mode : exit_underline_mode);
|
|
}
|
|
|
|
char *
|
|
terminfo_set_background(int arg)
|
|
{
|
|
return tiparm(set_a_background, arg);
|
|
}
|
|
|
|
char *
|
|
terminfo_set_foreground(int arg)
|
|
{
|
|
return tiparm(set_a_foreground, arg);
|
|
}
|
|
|
|
int
|
|
terminfo_max_colors(void)
|
|
{
|
|
return max_colors;
|
|
}
|
|
|
|
char *
|
|
terminfo_cursor_address(int y, int x)
|
|
{
|
|
return tiparm(cursor_address, y, x);
|
|
}
|