How long are filenames? from your code:
<br />
char data[13] ; <br />
char current_dir[32] ;<br />
char loc[80] ; <br />
Also, if you have two conditions around any output. Are they correct?
if ( strlen ( ( *sr ) -> loc ) > 4 )<br />
if ( strlen ( l ) > 4 )<br />