Tetedeiench Head Of God | et voila, ct pas complique en fait.
J;ai fait une interface a la IRC ( vu que c;est en gros ce qu'on doit faire), qui pour l'instant me permet juste de dialoguer avec moi meme, mais c;est tout...
Enfin spagrave
Voici le source
Code :
- #include <stdio.h>
- #include <curses.h>
- void init_curses()
- {
- initscr();
- start_color();
- init_pair(1,COLOR_WHITE,COLOR_BLACK);
- init_pair(2,COLOR_WHITE,COLOR_BLUE);
- curs_set(0);
- keypad(stdscr,TRUE);
- }
- int main()
- {
- char* c;
- char* tab[23];
- char* tofree;
- int i;
- WINDOW* typebar, * chatbar;
-
- init_curses();
- typebar = subwin(stdscr,1,80,23,0);
- chatbar = subwin(stdscr,23,80,0,0);
- wbkgd(typebar,COLOR_PAIR(1));
- wbkgd(chatbar,COLOR_PAIR(2));
- wrefresh(typebar);
- wrefresh(chatbar);
- for (i=0;i<=22;i++)
- tab[i]=(char*)malloc(80*sizeof(char));
- wrefresh(chatbar);
- while(1)
- {
- c=(char*)malloc(80*sizeof(char));
- wgetstr(typebar,c);
- tofree = tab[0];
- for (i=0; i<22; i++)
- tab[i] = tab[i+1];
- tab[22]=c;
- wclear(chatbar);
- wmove(chatbar,0,0);
- for (i=0;i<=22;i++)
- {
- waddstr(chatbar,tab[i]);
- waddstr(chatbar,"\n" );
- }
- free(tofree);
- wclear(typebar);
- wrefresh(chatbar);
- }
- }
|
Si ca peux aider quelqu'un... ---------------
L'ingénieur chipset nortiaux : Une iFricandelle svp ! "Spa du pâté, hin!" ©®Janfynette | "La plus grosse collec vivante de bans abusifs sur pattes" | OCCT v12 OUT !
|