Add files via upload

main
witchdocsec 2023-07-11 02:14:39 +01:00 committed by GitHub
parent 50a9d95827
commit 9ae121b216
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 0 deletions

7
makefile Normal file
View File

@ -0,0 +1,7 @@
all: greet compile install
greet:
@echo "installing ord"
compile:
gcc ord.c -o ord -lncurses
install:
sudo mv ./ord /bin/ord

22
ord.c Normal file
View File

@ -0,0 +1,22 @@
#include <ncurses.h>
#include <stdlib.h>
int showord(){
int c = getch();
if (c != 27){
clear();
move(10,10);
printw("%d",c);
return 0;
} else {
return 1;
}
}
int main(){
initscr();
move(10,10);
int stped = 0;
while(!stped){
stped = showord();
}
endwin();
}