Subversion Repositories Kolibri OS

Rev

Rev 4358 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4358 Rev 4401
Line 540... Line 540...
540
	FILE *file;
540
	FILE *file;
541
	unsigned *count;
541
	unsigned *count;
542
	char **string_store;
542
	char **string_store;
543
	unsigned i = 0;
543
	unsigned i = 0;
Line -... Line 544...
-
 
544
 
544
 
545
	memset(line, 0, sizeof(line));
545
	snprintf(path, MAX_PATH_LENGTH, "compiler/tests/%s", filename);
546
	snprintf(path, MAX_PATH_LENGTH, "compiler/tests/%s", filename);
546
	file = fopen(path, "r");
547
	file = fopen(path, "r");
547
	if (!file) {
548
	if (!file) {
548
		return 0;
549
		return 0;
549
	}
550
	}
Line 550... Line 551...
550
	memset(test, 0, sizeof(struct rc_test_file));
551
	memset(test, 0, sizeof(struct rc_test_file));
Line 551... Line 552...
551
 
552
 
-
 
553
	count = &test->num_input_lines;
552
	count = &test->num_input_lines;
554
 
553
 
555
	while (fgets(line, MAX_LINE_LENGTH, file)){
554
	while (fgets(line, MAX_LINE_LENGTH, file)){
556
		char last_char = line[MAX_LINE_LENGTH - 1];
555
		if (line[MAX_LINE_LENGTH - 2] == '\n') {
557
		if (last_char && last_char != '\n') {
556
			fprintf(stderr, "Error line cannot be longer than 100 "
558
			fprintf(stderr, "Error line cannot be longer than 100 "