ObjFW  Diff

Differences From Artifact [faffa6159e]:

To Artifact [54901ff7c9]:


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
95
96
97
98
99
100
101
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
95
96

97
98
99
100
101
102
103







+


-
+
-





-



-
+
+

-
+
+

+
-
-
-
-
-
+
+
+
+
+
+
-







}

- (void)applicationDidFinishLaunching
{
	OFHTTPRequest *request;

	[of_stdout writeString: @"Downloading UnicodeData.txt…"];
	_state = STATE_UNICODE_DATA;
	request = [OFHTTPRequest requestWithURL:
	    [OFURL URLWithString: UNICODE_DATA_URL]];
	[_HTTPClient asyncPerformRequest: request
	[_HTTPClient asyncPerformRequest: request];
				 context: @"UnicodeData"];
}

-      (void)client: (OFHTTPClient *)client
  didPerformRequest: (OFHTTPRequest *)request
	   response: (OFHTTPResponse *)response
	    context: (id)context
{
	[of_stdout writeLine: @" done"];

	if ([context isEqual: @"UnicodeData"])
	switch (_state) {
	case STATE_UNICODE_DATA:
		[self parseUnicodeData: response];
	else if ([context isEqual: @"CaseFolding"])
		break;
	case STATE_CASE_FOLDING:
		[self parseCaseFolding: response];
		break;
}

-	   (void)client: (OFHTTPClient *)client
  didEncounterException: (id)exception
		request: (OFHTTPRequest *)request
	}
}

-	  (void)client: (OFHTTPClient *)client
  didFailWithException: (id)exception
	       request: (OFHTTPRequest *)request
		context: (id)context
{
	@throw exception;
}

- (void)parseUnicodeData: (OFHTTPResponse *)response
{
	OFString *line;
166
167
168
169
170
171
172

173
174
175

176
177
178
179
180
181
182
183
168
169
170
171
172
173
174
175
176
177

178

179
180
181
182
183
184
185







+


-
+
-








	[self applyDecompositionRecursivelyForTable: _decompositionTable];
	[self applyDecompositionRecursivelyForTable: _decompositionCompatTable];

	[of_stdout writeLine: @" done"];

	[of_stdout writeString: @"Downloading CaseFolding.txt…"];
	_state = STATE_CASE_FOLDING;
	request = [OFHTTPRequest requestWithURL:
	    [OFURL URLWithString: CASE_FOLDING_URL]];
	[_HTTPClient asyncPerformRequest: request
	[_HTTPClient asyncPerformRequest: request];
				 context: @"CaseFolding"];
}

- (void)parseCaseFolding: (OFHTTPResponse *)response
{
	OFString *line;

	[of_stdout writeString: @"Parsing CaseFolding.txt…"];