Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- rm a.out
- gcc -x c - -lncursesw <<EOF
- #include <stdio.h>
- #include <curses.h>
- #include <locale.h>
- int mi1,mi2,KWGT;
- char rstr[1000],rstr1[1000],rstr2[10000];
- main(int argc,char **argv) {
- setlocale(LC_ALL, "ru_RU.UTF-8");
- initscr();
- attrset(A_NORMAL);
- erase();
- start_color();
- init_pair(1,COLOR_BLUE,COLOR_WHITE);
- init_pair(2,COLOR_WHITE,COLOR_BLUE);
- init_pair(3,COLOR_YELLOW,COLOR_BLUE);
- init_pair(4,COLOR_BLACK,COLOR_WHITE);
- keypad(stdscr,TRUE);
- noecho();
- nodelay(stdscr,TRUE);
- attrset(COLOR_PAIR(3));
- attron(A_BOLD);
- for(mi1=1;mi1<82;mi1++) {
- rstr[mi1]=' ';
- rstr1[mi1]=' ';
- rstr2[mi1*3+0]=0xE2;
- rstr2[mi1*3+1]=0x94;
- rstr2[mi1*3+2]=0x80;
- }
- rstr2[0*3+0]=0xE2;
- rstr2[0*3+1]=0x94;
- rstr2[0*3+2]=0x8c;
- rstr2[mi1*3+0-6]=0xE2;
- rstr2[mi1*3+1-6]=0x94;
- rstr2[mi1*3+2-6]=0x90;
- rstr2[mi1*3]=0;
- rstr1[mi1*3-1]=0;
- mvaddnstr(0,0,rstr2,mi1*3-2);
- sprintf(&rstr[0], "ВНИМАНИЕ - ATTENTION - 1,2,3 - А,Б,В,Г,Д,"
- " а,б,в,г,д - A,B,C,D,E, a,b,c,d,e");
- for(mi1=1;mi1<82;mi1++)
- if(rstr[mi1]==0)
- rstr[mi1]=' ';
- mvaddnstr(1,1,rstr,78);
- a2:
- refresh();
- a1:
- KWGT=wgetch(stdscr);
- if(KWGT==ERR)
- goto a1;
- }
- EOF
- ./a.out
Advertisement
Add Comment
Please, Sign In to add comment