Need advice, program no longer fully functional.

This is a discussion on Need advice, program no longer fully functional. within the Linux Programming forums, part of the Platform Specific Boards category; Hi everyone. I've been dusting off some old projects lately and have found that one of my programs no longer ...

Need advice, program no longer fully functional.

Hi everyone. I've been dusting off some old projects lately and have found that one of my programs no longer works as it should. I've done internet and forum searches and can't find an answer.

The program is one I shared here some time back. It is a basic Linux command line interpreter. It has the ability run external programs as well as five(so far) internal functions. The problem is that three of those internal commands no longer seem to work.

These above are the two sections of code responsible for determining command line input and taking the appropriate action.

External commands run as they should. The functions that recognize attempted use of pipes or redirects works. The trouble is that the internal cd, version, and exit commands no longer work. I get the built-in command not found error and the prompt simply returns.

gdb shows no abnormal working of the program.
gcc -Q show all functions are present and being compiled.
a simple gcc filename.c -o filename compilation works without warning or error.

Thanks Salem, I'll take a look at that. Those functions do have return values that can be checked. It seems the Scite editor uses compiler options I rarely had before. These warnings could have always been there, and I just wasn't aware of them until now. I don't know if that is the source of the problem, but I will be re-coding for those checks to see and because I don't like warnings to persist once I am aware of them.

I figured it out. While using Scite's find and replace function, I accidentally replaced an argument name I shouldn't have. Since it was in an area seemingly unrelated to the problem, it took a while of just staring at the code to see it. On the other hand, I did fix the unused results errors by coding in the appropriate checks, so thanks again for pointing that out.