mirror of https://github.com/witchdocsec/ord.git
Add files via upload
parent
50a9d95827
commit
9ae121b216
|
@ -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
|
|
@ -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();
|
||||
}
|
Loading…
Reference in New Issue