#include #include #include void main( void ) { char pathbuffer[120]; char searchfile[] = "LAST.*"; char envvar[] = "PATH"; /* Search for file in PATH environment variable: */ _searchenv( searchfile, envvar, pathbuffer ); if( *pathbuffer != '\0' ) printf( "Path for %s: %s\n", searchfile, pathbuffer ); else printf( "%s not found\n", searchfile ); return (0); }