ObjFW  Check-in [431116c906]

Overview
Comment:ofhttp: Fix compiling with Apple GCC 4.2.1
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 431116c90698e330334dc0184784ce2ff9e7baf835bfe14100044dcbe7345d09
User & Date: js on 2020-09-27 02:12:44
Other Links: manifest | tags
Context
2020-09-27
02:29
tests: Fix compiling with Apple GCC 4.2.1 check-in: 33bec58cf4 user: js tags: trunk
02:12
ofhttp: Fix compiling with Apple GCC 4.2.1 check-in: 431116c906 user: js tags: trunk
01:56
Fix compiling for old Apple runtime check-in: 877616edaf user: js tags: trunk
Changes

Modified utils/ofhttp/OFHTTP.m from [d4c7821db4] to [cd147444d1].

456
457
458
459
460
461
462
463

464
465
466
467
468
469
470
471
472

473
474
475

476
477
478
479
480
481
482
456
457
458
459
460
461
462

463
464
465
466
467
468
469
470
471

472
473
474

475
476
477
478
479
480
481
482







-
+








-
+


-
+







	[OFLocale addLanguageDirectory: @"PROGDIR:/share/ofhttp/lang"];
#endif

	optionsParser = [OFOptionsParser parserWithOptions: options];
	while ((option = [optionsParser nextOption]) != '\0') {
		switch (option) {
		case 'b':
			self.body = optionsParser.argument;
			[self setBody: optionsParser.argument];
			break;
		case 'h':
			help(of_stdout, true, 0);
			break;
		case 'H':
			[self addHeader: optionsParser.argument];
			break;
		case 'm':
			self.method = optionsParser.argument;
			[self setMethod: optionsParser.argument];
			break;
		case 'P':
			self.proxy = optionsParser.argument;
			[self setProxy: optionsParser.argument];
			break;
		case ':':
			if (optionsParser.lastLongOption != nil)
				[of_stderr writeLine:
				    OF_LOCALIZED(@"long_argument_missing",
				    @"%[prog]: Argument for option --%[opt] "
				    @"missing"
758
759
760
761
762
763
764
765

766
767
768
769
770
771
772
758
759
760
761
762
763
764

765
766
767
768
769
770
771
772







-
+







	}

	_received += length;

	[_output writeBuffer: buffer
		      length: length];

	_progressBar.received = _received;
	[_progressBar setReceived: _received];

	if (response.atEndOfStream) {
		[_progressBar stop];
		[_progressBar draw];
		[_progressBar release];
		_progressBar = nil;

936
937
938
939
940
941
942
943

944
945
946
947
948
949
950
936
937
938
939
940
941
942

943
944
945
946
947
948
949
950







-
+







		}
	}

	if (!_quiet) {
		_progressBar = [[ProgressBar alloc]
		    initWithLength: _length
		       resumedFrom: _resumedFrom];
		_progressBar.received = _received;
		[_progressBar setReceived: _received];
		[_progressBar draw];
	}

	[_currentFileName release];
	_currentFileName = nil;

	response.delegate = self;