ObjFW  Check-in [eba39f1c9d]

Overview
Comment:OF_APPLICATION_DELEGATE(): Verify conformance
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: eba39f1c9dc36ab0851ff706fe59038ae14df109c28190103af322b30b9b56ca
User & Date: js on 2017-11-22 00:47:40
Other Links: manifest | tags
Context
2017-11-22
01:05
OF_APPLICATION_DELEGATE(): Improve type checking check-in: 54b38752bb user: js tags: trunk
00:47
OF_APPLICATION_DELEGATE(): Verify conformance check-in: eba39f1c9d user: js tags: trunk
2017-11-20
22:35
OFSetTests: Test all implementations check-in: 7c8ac46f53 user: js tags: trunk
Changes

Modified src/OFApplication.m from [9f8423320a] to [34ff9074e3].

121
122
123
124
125
126
127
128
129
130



131
132
133

134
135
136
137
138
139
140
141
121
122
123
124
125
126
127



128
129
130



131

132
133
134
135
136
137
138







-
-
-
+
+
+
-
-
-
+
-







#ifdef OF_WINDOWS
	wchar_t **wargv, **wenvp;
	int wargc, si = 0;
#endif

	[[OFLocalization alloc] init];

	if ([cls isSubclassOfClass: [OFApplication class]]) {
		fprintf(stderr, "FATAL ERROR:\n  Class %s is a subclass of "
		    "class OFApplication, but class\n  %s was specified as "
	if (![cls conformsToProtocol: @protocol(OFApplicationDelegate)]) {
		fprintf(stderr, "FATAL ERROR:\n  Class %s does not conform to "
		    "protocol OFApplicationDelegate,\n  but was specified via "
		    "application delegate!\n  Most likely, you wanted to "
		    "subclass OFObject instead or specified\n  the wrong class "
		    "with OF_APPLICATION_DELEGATE().\n",
		    "OF_APPLICATION_DELEGATE()!\n", class_getName(cls));
		    class_getName(cls), class_getName(cls));
		exit(1);
	}

	app = [[OFApplication alloc] of_init];

	[app of_setArgumentCount: argc
	       andArgumentValues: argv];

Modified utils/ofhash/OFHash.m from [8ba8298b95] to [c8a24217c3].

29
30
31
32
33
34
35
36

37
38
39
40
41
42
43
29
30
31
32
33
34
35

36
37
38
39
40
41
42
43







-
+







#import "OFStdIOStream.h"
#import "OFLocalization.h"
#import "OFSandbox.h"

#import "OFOpenItemFailedException.h"
#import "OFReadFailedException.h"

@interface OFHash: OFObject
@interface OFHash: OFObject <OFApplicationDelegate>
@end

OF_APPLICATION_DELEGATE(OFHash)

static void
help(void)
{

Modified utils/ofhttp/OFHTTP.m from [e43d76979b] to [d6522c977d].

48
49
50
51
52
53
54
55

56
57
58
59
60
61
62
48
49
50
51
52
53
54

55
56
57
58
59
60
61
62







-
+








#import "ProgressBar.h"

#define GIBIBYTE (1024 * 1024 * 1024)
#define MEBIBYTE (1024 * 1024)
#define KIBIBYTE (1024)

@interface OFHTTP: OFObject <OFHTTPClientDelegate>
@interface OFHTTP: OFObject <OFApplicationDelegate, OFHTTPClientDelegate>
{
	OFArray OF_GENERIC(OFString *) *_URLs;
	size_t _URLIndex;
	int _errorCode;
	OFString *_outputPath, *_currentFileName;
	bool _continue, _force, _detectFileName, _detectedFileName;
	bool _quiet, _verbose, _insecure;

Modified utils/ofzip/OFZIP.h from [afc71f5901] to [93eeb1cd0b].

22
23
24
25
26
27
28
29

30
31
32
33
34
35
36
22
23
24
25
26
27
28

29
30
31
32
33
34
35
36







-
+







#ifndef S_IRWXG
# define S_IRWXG 0
#endif
#ifndef S_IRWXO
# define S_IRWXO 0
#endif

@interface OFZIP: OFObject
@interface OFZIP: OFObject <OFApplicationDelegate>
{
	int8_t _overwrite;
@public
	int8_t _outputLevel;
	OFString *_archivePath;
	int _exitStatus;
}