ObjFW  Diff

Differences From Artifact [34ff9074e3]:

To Artifact [9f443dae6c]:


111
112
113
114
115
116
117
118

119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
#endif
#ifdef SIGUSR2
SIGNAL_HANDLER(SIGUSR2)
#endif
#undef SIGNAL_HANDLER

int
of_application_main(int *argc, char **argv[], Class cls)

{
	id <OFApplicationDelegate> delegate;
#ifdef OF_WINDOWS
	wchar_t **wargv, **wenvp;
	int wargc, si = 0;
#endif

	[[OFLocalization alloc] init];

	if (![cls conformsToProtocol: @protocol(OFApplicationDelegate)]) {
		fprintf(stderr, "FATAL ERROR:\n  Class %s does not conform to "
		    "protocol OFApplicationDelegate,\n  but was specified via "
		    "OF_APPLICATION_DELEGATE()!\n", class_getName(cls));
		exit(1);
	}

	app = [[OFApplication alloc] of_init];

	[app of_setArgumentCount: argc
	       andArgumentValues: argv];

#ifdef OF_WINDOWS
	__wgetmainargs(&wargc, &wargv, &wenvp, _CRT_glob, &si);
	[app of_setArgumentCount: wargc
	   andWideArgumentValues: wargv];
#endif

	delegate = [[cls alloc] init];
	[app setDelegate: delegate];

	[app of_run];

	[delegate release];

	return 0;







|
>

<







<
<
<
<
<
<
<











<







111
112
113
114
115
116
117
118
119
120

121
122
123
124
125
126
127







128
129
130
131
132
133
134
135
136
137
138

139
140
141
142
143
144
145
#endif
#ifdef SIGUSR2
SIGNAL_HANDLER(SIGUSR2)
#endif
#undef SIGNAL_HANDLER

int
of_application_main(int *argc, char **argv[],
    id <OFApplicationDelegate> delegate)
{

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

	[[OFLocalization alloc] init];








	app = [[OFApplication alloc] of_init];

	[app of_setArgumentCount: argc
	       andArgumentValues: argv];

#ifdef OF_WINDOWS
	__wgetmainargs(&wargc, &wargv, &wenvp, _CRT_glob, &si);
	[app of_setArgumentCount: wargc
	   andWideArgumentValues: wargv];
#endif


	[app setDelegate: delegate];

	[app of_run];

	[delegate release];

	return 0;