1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-15 23:35:34 +00:00

Missing files

This commit is contained in:
Witold Filipczyk 2017-11-19 20:18:44 +01:00
parent c4cb7ed8e5
commit 299e2b9aa4
2 changed files with 67 additions and 0 deletions

56
src/terminal/terminfo.c Normal file
View File

@ -0,0 +1,56 @@
/** 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_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);
}

11
src/terminal/terminfo.h Normal file
View File

@ -0,0 +1,11 @@
#ifndef EL__TERMINAL_TERMINFO_H
#define EL__TERMINAL_TERMINFO_H
int terminfo_setupterm(char *term, int fildes);
char *terminfo_set_bold(int arg);
char *terminfo_set_italics(int arg);
char *terminfo_set_underline(int arg);
char *terminfo_set_foreground(int arg);
char *terminfo_set_background(int arg);
#endif