[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: My program or my veins
From: |
Thomas Dickey |
Subject: |
Re: My program or my veins |
Date: |
Wed, 21 Aug 2002 08:28:19 -0400 |
User-agent: |
Mutt/1.2.5i |
On Wed, Aug 21, 2002 at 02:14:09PM +0200, Docume wrote:
> I need to find the answer, it is imperative or I will cut my veins. :-P
> I can't run my program I spent hours reading papers, newsgroups... and I
> couldn't find the solution!!
>
> As Thomas wrote I remove getch() but the program do the same, shows the
> box but not the message. AAAAAAAAAAAAAAHHHHHHHHHHHHH
>
> Kill kill kill ncurses KIIIIIILLLL!!!!!
( not necessary ;-)
I started to look at this last night, but put it aside to work on diffstat
(was working on lynx).
The reason why the text doesn't show up is because it is being written to
stdscr, which is hidden by the window containing the box. I considered
making portada() write to that window, but was not sure that was your
intention. If portada writes/reads from the same window, there should be
no problems...
> int portada (int maxy, int maxx) //Should put titulo, autor and anio centered
> {
> char titulo[]="Ncurses Bug v0.1";
> char autor[]="(c) by Anonymous";
> char anio[]="2002";
>
> int ancho;
>
> if (strlen(titulo)>strlen(autor))
> if (strlen(titulo)>strlen(anio))
> { ancho = strlen(titulo);
> mvprintw(maxy/2,(maxx-ancho)/2,"%s",titulo);
> }
> else
> if (strlen(autor)>strlen(anio))
> { ancho = strlen(autor);
> mvprintw(maxy/2,(maxx-ancho)/2,"%s",autor);
> }
> else { ancho = strlen (anio);
> mvprintw(maxy/2,(maxx-ancho)/2,"%s",anio);}
>
> //getch();
> return 0;
> }
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net