Пример #1
0
int main (int argc, char ** argv )
{

	setvbuf(stdin, buff_stdin, _IOFBF, 0x1000);
	setvbuf(stdout, buff_stdout, _IOFBF, 0x1000);

	char *real_obj_name = NULL;
	Input_Obj_Type tMode;

	tMode = get_work_mode (argc, argv);

	if ( save_settings_to_fs () < 0 )
		return -1;

	if ( ( real_obj_name = prepare_object (tMode)) == NULL )
	{
		return -1;
	}
	docs_to_xml( TEMP_DIR, tMode );
	do_index_xml ();
	save_index ();

	//mylistdir( "/" );

	return 0;
}
int main (int argc, char ** argv )
{

//	setvbuf(stdin, buff_stdin, _IOFBF, 0x1000);
//	setvbuf(stdout, buff_stdout, _IOFBF, 0x1000);

	char *real_obj_name = NULL;
	int mode = 0;

	mode = get_work_mode (argc, argv);

	if ( save_settings_to_fs () < 0 )
		return -1;

	if ( ( real_obj_name = prepare_object (mode)) == NULL )
	{
		return -1;
	}

	test_read_dir( "/docs/list.txt" );

	docs_to_xml( TEMP_DIR, mode );
	do_index_xml ();
	save_index ();

	mylistdir( "/" );

	return 0;
}