Example #1
0
int main(int argc, char **argv){
	if(argc != 2){
		return -1;
	}
	if(read_logs(argv[1]) != 0){
		return -1;
	}
	return 0;
}
Example #2
0
void Console::update()
{
    int new_pos = qtscrob->scrob->get_num_logs();
	if (new_pos > log_pos)
	{
		read_logs(log_pos, new_pos);
	}
	else if (new_pos < log_pos)
	{
		// The log has been cleared?
		read_all_logs();
	}
}
Example #3
0
int main(int argc, char **argv){
	int i;
	unsigned int a,b;
	unsigned long int total;
	total = 0;
	i=0;
	while(1==1){
		read_logs(argv);
		a = table_dest.start;
		b = table_dest.end;
		if(a <= b){
			total = total + b - a;
		}
		else{
			total = total + (COPY_MAX_PACKETS - a) + b;
		}
		i++;
		if(i >= 100){
		printf("%u\n", total);
		i = 0;
		}
	}
	return 0;
}
Example #4
0
void Console::read_all_logs()
{
	edtConsole->clear();
	read_logs(0, qtscrob->scrob->get_num_logs());
}