コード例 #1
0
/*
	ANT_DIRECTORY_ITERATOR_TREC_RECURSIVE::NEXT()
	---------------------------------------------
*/
ANT_directory_iterator_object *ANT_directory_iterator_trec_recursive::next(ANT_directory_iterator_object *object)
{
ANT_directory_iterator_object *got;

while (more_files != NULL)
	{
	if (first_time)
		got = detrecer->first(object);
	else
		got = detrecer->next(object);

	first_time = false;

	if (got == NULL)
		{
		if ((more_files = filename_provider->next(object)) != NULL)
			{
			new_provider(object->filename);
			first_time = true;
			}
		}
	else
		return got;
	}

return NULL;
}
コード例 #2
0
ファイル: sse-multiplexd.c プロジェクト: Philzen/packages
static provider_t * get_provider(const char *command) {
        provider_t *p;
        for (p = providers; p; p = p->next) {
                if (!strcmp(p->command, command))
                        return p;
        }

        return new_provider(command);
}
コード例 #3
0
/*
	ANT_DIRECTORY_ITERATOR_TREC_RECURSIVE::ANT_DIRECTORY_ITERATOR_TREC_RECURSIVE()
	------------------------------------------------------------------------------
*/
ANT_directory_iterator_trec_recursive::ANT_directory_iterator_trec_recursive(char *source, long get_file, long long scrubbing_options) : ANT_directory_iterator("", get_file)
{
ANT_directory_iterator_object filename;

this->source = source;
filename_provider = new ANT_directory_iterator_recursive(source, 0);

this->scrubbing_options = scrubbing_options;

more_files = filename_provider->first(&filename);
first_time = true;

file_stream = NULL;
decompressor = NULL;
instream_buffer = NULL;
scrubber = NULL;
detrecer = NULL;
memory = NULL;

new_provider(filename.filename);
}