summaryrefslogtreecommitdiff
path: root/utils/testdirpath.cc
blob: 3ffd2cd1ae431c229bc28b61098abf187f282c3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <stdio.h>
#include <stdlib.h>
#include "DirPath.h"

main ()
{
	char line [256];
	const char *s;
	const char *found;
	IvlDirPath p;
	const char* path = getenv ("PATH");
	p.AppendEnvPath (path);

	while (s = gets (line)) {
		found = p.FindFile (s);
		printf ("%s %s\n", found ? "found" : s, found ? found : "not found");
	}
}