ObjFW  Check-in [f8940826b9]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix compiling with DJGPP
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f8940826b93e4c1557c5618ef7d8fc7fe7b9f4170de151f8827a02853be4aa2b
User & Date: js 2025-03-24 21:00:56.931
Context
2025-03-26
00:18
Allow OF_DIRECT with ObjFW runtime if Clang >= 21 check-in: 5d529cc132 user: js tags: trunk
2025-03-24
21:00
Fix compiling with DJGPP check-in: f8940826b9 user: js tags: trunk
2025-03-23
21:07
Add OFDistanceOfVectors[34]D check-in: 6f6b5dc1af user: js tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/OFXMLParser.m.
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
static void
inProcessingInstructionState(OFXMLParser *self)
{
	if (self->_data[self->_i] == '?')
		self->_level = 1;
	else if (self->_level == 1 && self->_data[self->_i] == '>') {
		void *pool = objc_autoreleasePoolPush();
		OFString *PI, *target, *text = nil;
		OFCharacterSet *whitespaceCS;
		size_t pos;

		appendToBuffer(self->_buffer, self->_data + self->_last,
		    self->_encoding, self->_i - self->_last);
		PI = transformString(self, self->_buffer, 1, false);

		whitespaceCS = [OFCharacterSet
		    characterSetWithCharactersInString: @" \r\n\r"];
		pos = [PI rangeOfCharacterFromSet: whitespaceCS].location;
		if (pos != OFNotFound) {
			target = [PI substringToIndex: pos];
			text = [[PI substringFromIndex: pos + 1]
			    stringByDeletingEnclosingWhitespaces];

			if (text.length == 0)
				text = nil;
		} else
			target = PI;

		if ([target caseInsensitiveCompare: @"xml"] == OFOrderedSame)
			if (!parseXMLProcessingInstruction(self, text))
				@throw [OFMalformedXMLException
				    exceptionWithParser: self];

		if ([self->_delegate respondsToSelector: @selector(







|





|



|

|
|





|







499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
static void
inProcessingInstructionState(OFXMLParser *self)
{
	if (self->_data[self->_i] == '?')
		self->_level = 1;
	else if (self->_level == 1 && self->_data[self->_i] == '>') {
		void *pool = objc_autoreleasePoolPush();
		OFString *PI_, *target, *text = nil;
		OFCharacterSet *whitespaceCS;
		size_t pos;

		appendToBuffer(self->_buffer, self->_data + self->_last,
		    self->_encoding, self->_i - self->_last);
		PI_ = transformString(self, self->_buffer, 1, false);

		whitespaceCS = [OFCharacterSet
		    characterSetWithCharactersInString: @" \r\n\r"];
		pos = [PI_ rangeOfCharacterFromSet: whitespaceCS].location;
		if (pos != OFNotFound) {
			target = [PI_ substringToIndex: pos];
			text = [[PI_ substringFromIndex: pos + 1]
			    stringByDeletingEnclosingWhitespaces];

			if (text.length == 0)
				text = nil;
		} else
			target = PI_;

		if ([target caseInsensitiveCompare: @"xml"] == OFOrderedSame)
			if (!parseXMLProcessingInstruction(self, text))
				@throw [OFMalformedXMLException
				    exceptionWithParser: self];

		if ([self->_delegate respondsToSelector: @selector(