ObjFW  Diff

Differences From Artifact [9cfc874f7b]:

To Artifact [80d23d5595]:


151
152
153
154
155
156
157
158

159
160
161
162
163
164
165
151
152
153
154
155
156
157

158
159
160
161
162
163
164
165







-
+








	[_arguments release];
	[_argument release];

	[super dealloc];
}

- (of_unichar_t)nextOption
- (OFUnichar)nextOption
{
	of_options_parser_option_t *iter;
	OFString *argument;

	if (_done || _index >= _arguments.count)
		return '\0';

188
189
190
191
192
193
194
195

196
197
198
199
200
201
202

203
204
205
206
207
208
209
188
189
190
191
192
193
194

195
196
197
198
199
200
201

202
203
204
205
206
207
208
209







-
+






-
+







			size_t pos;
			of_options_parser_option_t *option;

			_lastOption = '-';
			_index++;

			if ((pos = [argument rangeOfString: @"="].location) !=
			    OF_NOT_FOUND)
			    OFNotFound)
				_argument = [[argument
				    substringFromIndex: pos + 1] copy];
			else
				pos = argument.length;

			_lastLongOption = [[argument substringWithRange:
			    of_range(2, pos - 2)] copy];
			    OFMakeRange(2, pos - 2)] copy];

			objc_autoreleasePoolPop(pool);

			option = [_longOptions objectForKey: _lastLongOption];
			if (option == NULL)
				return '?';

267
268
269
270
271
272
273
274

275
276
267
268
269
270
271
272
273

274
275
276







-
+



	return '?';
}

- (OFArray *)remainingArguments
{
	return [_arguments objectsInRange:
	    of_range(_index, _arguments.count - _index)];
	    OFMakeRange(_index, _arguments.count - _index)];
}
@end