Subversion Repositories svn.Prod repos

Compare Revisions

Ignore whitespace Rev 43 → Rev 53

/filefind/C/filefind.c
29,7 → 29,7
 
#include <errno.h>
 
#define PATH_MAX 255
#define PATH_MAX2 255
 
// ============================================================================
// Functions
45,19 → 45,19
 
void traverse(char *directory)
{
char curdir[PATH_MAX];
char curdir2[PATH_MAX];
char curdir[PATH_MAX2];
char curdir2[PATH_MAX2];
 
getcwd(curdir, PATH_MAX);
getcwd(curdir, PATH_MAX2);
chdir(directory);
getcwd(curdir2, PATH_MAX);
getcwd(curdir2, PATH_MAX2);
 
DIR *dir = NULL;
struct dirent entry;
struct dirent *entryPtr = NULL;
int retval = 0;
char pathName[PATH_MAX + 1];
char pfile[PATH_MAX + 1];
char pathName[PATH_MAX2 + 1];
char pfile[PATH_MAX2 + 1];
 
/* Open the given directory, if you can. */
dir = opendir(curdir2);
70,8 → 70,8
{
struct stat entryInfo;
if( ( ! strncmp( entry.d_name, ".", PATH_MAX ) == 0 ) &&
( ! strncmp( entry.d_name, "..", PATH_MAX ) == 0 ) )
if( ( ! strncmp( entry.d_name, ".", PATH_MAX2 ) == 0 ) &&
( ! strncmp( entry.d_name, "..", PATH_MAX2 ) == 0 ) )
{
sprintf(pfile,"%s/%s", curdir2, entry.d_name);
if (isdir(entry.d_name) && ! issymlink(entry.d_name))