/* Match pattern against files in locate.db file */ static int db_locate( const wchar_t *pattern) { int count = 0; #ifdef WIN32 wchar_t buffer[PATH_MAX + 1]; /* Open locate.db for read */ db_open (); /* Read one directory and file name at a time from database file */ while (db_read (buffer, PATH_MAX)) { /* See if file name in buffer matches the search pattern */ if (db_match (buffer, pattern)) { /* Match found => output file name and path */ wprintf (L"%s\n", buffer); count++; } } db_close (); #endif return count; }
soulB::checks_returns soulCH::acl_checks(char *acl) { /* Run checks for ACL if they exist in confile file */ soulB::checks_returns return_value = CONTINUE; if ((db_io->do_exist(users_file,0,acl,NULL)) == TRUE) if(return_value = user_match(acl)) return return_value; if ((db_io->do_exist(ext_file,0,acl,NULL)) == TRUE) if(return_value = extensions_match(acl)) return return_value; if ((db_io->do_exist(key_file,0,acl,NULL)) == TRUE) if(return_value = keyword_match(acl)) return return_value; if ((db_io->do_exist(prob_file,0,acl,NULL)) == TRUE) if(return_value = prob_match(acl)) return return_value; if ((db_io->do_exist(textdom_file,0,acl,NULL)) == TRUE) if(return_value = db_match(acl,DOMAINS)) return return_value; if ((db_io->do_exist(texturl_file,0,acl,NULL)) == TRUE) if(return_value = db_match(acl,URLS)) return return_value; return CONTINUE; }