Just making pLinhas
as static
makes it to work fine. I suppose the problem was reference to nonexistent pointers after the end of function scope. So, this code was tested and works!
void FilaInit()
{ int i = 0;
static char elementos[8][128];
static char * pLinhas[8];
for (i = 0; i < 8; i++)
pLinhas[i] = &elementos[i][0];
Fila_Init(&TELIT_dadosRecebidos, 8, 128, pLinhas);
}
A detail is that pLinhas is an array of pointers to char, an array of pointers to strings. Its size is 8*4 bytes. Other point is that I must to use constant integer to declare pLinhas.
I would like to emphasize this solution...I have searched a lot this kind of structured data. It's very interesting in cases where you cannot use malloc, like embedded applications, but need to create more than one queue with different sizes.
For those who want to use this solution, I've created this project on google code: Qwoma. It would be a great pleasure to receive critics and ideas to this simple project.
Thanks everyone!