Skip to content

Instantly share code, notes, and snippets.

@manvscode
Created May 25, 2022 15:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manvscode/5c97a5c06ded817bb6268a5676f01127 to your computer and use it in GitHub Desktop.
Save manvscode/5c97a5c06ded817bb6268a5676f01127 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
#include <term.h>
#include <curses.h>
#include <unistd.h>
int main(int argc, char* argv[])
{
int status = 0;
setupterm(NULL, STDOUT_FILENO, &status);
if( status != 1 )
{
return 1;
}
// clear screen
putp(clear_screen);
//putp(cursor_invisible);
char* s = tparm(cursor_address, 10, 10);
putp(s);
putp("*");
s = tparm(cursor_address, 15, 20);
putp(s);
//vidattr( A_BOLD );
vid_attr( A_COLOR, COLOR_YELLOW, NULL);
putp("Hello ");
vidattr( A_NORMAL );
//vidattr( A_DIM );
putp("World");
fprintf(stdout, "%dx%d\n", columns, lines);
//putp(cursor_visible);
getchar();
//putp(cursor_to_ll);
//putp(cursor_home);
//s = tparm(scroll_reverse, 20);
vid_attr( A_ALTCHARSET, ACS_VLINE, NULL );
addch(ACS_VLINE);
resetterm();
putp("\n");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment