ObjFW  Diff

Differences From Artifact [3e135bdea5]:

To Artifact [8e3d4d56d3]:


40
41
42
43
44
45
46
47

48
49
50
51
52
53
54
55

56
57
58
59
60
61
62
63
64
65


66
67
68
69
70
71
72
73
74


75
76
77


78
79
80
81
82
83
84
85
86
87

88
89
90
91
92
93
94
40
41
42
43
44
45
46

47
48
49
50
51
52
53
54

55
56
57
58
59
60
61
62
63


64
65
66
67
68
69
70
71
72


73
74
75


76
77
78
79
80
81
82
83
84
85
86

87
88
89
90
91
92
93
94







-
+







-
+








-
-
+
+







-
-
+
+

-
-
+
+









-
+







	size_t i;
	OFEnumerator OF_GENERIC(OFColor *) *reverseEnumerator;

	[of_stdout writeFormat: @"%dx%d\n", of_stdout.columns, of_stdout.rows];

	i = 0;
	for (OFColor *color in colors) {
		of_stdout.foregroundColor = color;
		[of_stdout setForegroundColor: color];
		[of_stdout writeFormat: @"%zx", i++];
	}
	[of_stdout reset];
	[of_stdout writeLine: @"R"];

	i = 0;
	for (OFColor *color in colors) {
		of_stdout.backgroundColor = color;
		[of_stdout setBackgroundColor: color];
		[of_stdout writeFormat: @"%zx", i++];
	}
	[of_stdout reset];
	[of_stdout writeLine: @"R"];

	i = 0;
	reverseEnumerator = [colors.reversedArray objectEnumerator];
	for (OFColor *color in colors) {
		of_stdout.foregroundColor = color;
		of_stdout.backgroundColor = [reverseEnumerator nextObject];
		[of_stdout setForegroundColor: color];
		[of_stdout setBackgroundColor: [reverseEnumerator nextObject]];
		[of_stdout writeFormat: @"%zx", i++];
	}
	[of_stdout reset];
	[of_stdout writeLine: @"R"];

	for (i = 0; i < colors.count * 2; i++) {
		if (i % 2)
			of_stdout.backgroundColor = [colors objectAtIndex:
			    ((i / 2) + 2) % colors.count];
			[of_stdout setBackgroundColor: [colors objectAtIndex:
			    ((i / 2) + 2) % colors.count]];
		else
			of_stdout.foregroundColor =
			    [colors objectAtIndex: i / 2];
			[of_stdout setForegroundColor:
			    [colors objectAtIndex: i / 2]];

		[of_stdout writeFormat: @"%zx", i / 2];
	}
	[of_stdout reset];
	[of_stdout writeLine: @"R"];

	[of_stdout writeLine: @"Press return"];
	[of_stdin readLine];

	of_stdout.backgroundColor = [OFColor green];
	[of_stdout setBackgroundColor: [OFColor green]];
	[of_stdout writeString: @"Hello!"];
	[OFThread sleepForTimeInterval: 2];
	[of_stdout eraseLine];
	[of_stdout writeString: @"World!"];
	[OFThread sleepForTimeInterval: 2];

	[of_stdout clear];