Mail Archives: djgpp/1996/03/29/14:08:25
Greetings... I'm using gcc to port a large Turbo C 3.0 program and strings
keep getting lost on returns. That is return(char *message) does not always
return what it should.
char *selector(int messagenumber)
{ .. scan database data[x] ..
if (messagenumber == data[x].number) break;
if (found == ok)
return(data[x].message);
else
return("<not found>");
}
The passed messagenumber works ok, the correct message is found in the database,
but the function keeps returning with prior returned message most of the
time and sometimes with the correctly indexed message. I have it printf the
message to be returned and it always selects the correct one but it keeps
returning wrong ones.
I figure I must have something screwed up someplace else and would like to
know if there is a lint for djgpp for dos?
HELP!!!!
- Raw text -