[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Andres Londoño
Subject: fiel_buffer
Date: Sat, 17 Nov 2001 23:17:37 +0100 (CET)


I am triying to make work the example  test/ncurses.c
using this WHILE to extract the contents of the user

It works, but in some fields there is no output to
and the cicle may exit the program as "overflow" (?).

char extractor[21]="";
int counter=4;

strcpy(extractor, field_buffer(f[counter], 0) );      
   /*  Error  */
code = atoi(extractor);     
mvprintw(1 + baja, 57, "%d -> %s \n", baja,
field_buffer(f[counter], 0));             

I think, sometimes  field_buffer() have garbage and
the  mvprintw() and  strcpy() 
function can not handle this. 

¿May I have to reserve memory for char extractor[]?

/*  What can I do */

Do You Yahoo!?
Yahoo! Messenger
Comunicación instantánea gratis con tu gente.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]